summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2008-11-06 13:23:07 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2008-11-06 13:23:07 +0000
commit2bedbdf4148ebbe48c7a89449ab52e475a788f42 (patch)
tree8824fd9f1a87257187972d9395c561e2682d53bf /arch
parent4369ae16eec16e6a922d4333da88a58fbc201369 (diff)
downloadop-kernel-dev-2bedbdf4148ebbe48c7a89449ab52e475a788f42.zip
op-kernel-dev-2bedbdf4148ebbe48c7a89449ab52e475a788f42.tar.gz
Add HWCAP_NEON to the ARM hwcap.h file
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/hwcap.h1
-rw-r--r--arch/arm/kernel/setup.c1
-rw-r--r--arch/arm/vfp/vfpmodule.c9
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h
index 81f4c89..bda489f 100644
--- a/arch/arm/include/asm/hwcap.h
+++ b/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/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 66e1a64..d4dae3e 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -773,6 +773,7 @@ static const char *hwcap_str[] = {
"iwmmxt",
"crunch",
"thumbee",
+ "neon",
NULL
};
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index c0d2c9b..67ca340 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/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;
}
OpenPOWER on IntegriCloud