From 28b5da90a662d7d6ca9cd626d0f187b659e9901a Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Thu, 6 Nov 2008 13:23:07 +0000 Subject: [PATCH] --- yaml --- r: 123550 b: refs/heads/master c: 2bedbdf4148ebbe48c7a89449ab52e475a788f42 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/include/asm/hwcap.h | 1 + trunk/arch/arm/kernel/setup.c | 1 + trunk/arch/arm/vfp/vfpmodule.c | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 73778ee8922b..dce9aac10db3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4369ae16eec16e6a922d4333da88a58fbc201369 +refs/heads/master: 2bedbdf4148ebbe48c7a89449ab52e475a788f42 diff --git a/trunk/arch/arm/include/asm/hwcap.h b/trunk/arch/arm/include/asm/hwcap.h index 81f4c899a555..bda489f9f017 100644 --- a/trunk/arch/arm/include/asm/hwcap.h +++ b/trunk/arch/arm/include/asm/hwcap.h @@ -16,6 +16,7 @@ #define HWCAP_IWMMXT 512 #define HWCAP_CRUNCH 1024 #define HWCAP_THUMBEE 2048 +#define HWCAP_NEON 4096 #if defined(__KERNEL__) && !defined(__ASSEMBLY__) /* diff --git a/trunk/arch/arm/kernel/setup.c b/trunk/arch/arm/kernel/setup.c index 66e1a643ed14..d4dae3e9b294 100644 --- a/trunk/arch/arm/kernel/setup.c +++ b/trunk/arch/arm/kernel/setup.c @@ -773,6 +773,7 @@ static const char *hwcap_str[] = { "iwmmxt", "crunch", "thumbee", + "neon", NULL }; diff --git a/trunk/arch/arm/vfp/vfpmodule.c b/trunk/arch/arm/vfp/vfpmodule.c index c0d2c9bb952b..67ca340a7c85 100644 --- a/trunk/arch/arm/vfp/vfpmodule.c +++ b/trunk/arch/arm/vfp/vfpmodule.c @@ -371,6 +371,15 @@ static int __init vfp_init(void) * in place; report VFP support to userspace. */ elf_hwcap |= HWCAP_VFP; +#ifdef CONFIG_NEON + /* + * Check for the presence of the Advanced SIMD + * load/store instructions, integer and single + * precision floating point operations. + */ + if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) + elf_hwcap |= HWCAP_NEON; +#endif } return 0; }