]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 5388/1: Add hwcap bits for VFPv3 and VFPv3D16
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 11 Feb 2009 12:13:56 +0000 (13:13 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 12 Feb 2009 10:59:44 +0000 (10:59 +0000)
The VFPv3D16 is a VFPv3 CPU configuration where only 16 double registers
are present, as the VFPv2 configuration. This patch adds the
corresponding hwcap bits so that applications or debuggers have more
information about the supported features.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/hwcap.h
arch/arm/kernel/setup.c
arch/arm/vfp/vfpmodule.c

index bda489f9f01739c4543ca9c2f99b1ede6a739a9f..f7bd52b1c3654430351a5b7c5f2665e527979908 100644 (file)
@@ -17,6 +17,8 @@
 #define HWCAP_CRUNCH   1024
 #define HWCAP_THUMBEE  2048
 #define HWCAP_NEON     4096
+#define HWCAP_VFPv3    8192
+#define HWCAP_VFPv3D16 16384
 
 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
 /*
index 7049815d66d566e7d89c08fd3c25e33b8c48c995..645ec743668130fe826ba613129f7084838803ae 100644 (file)
@@ -779,6 +779,8 @@ static const char *hwcap_str[] = {
        "crunch",
        "thumbee",
        "neon",
+       "vfpv3",
+       "vfpv3d16",
        NULL
 };
 
index 7e1239041b39ed5e827266945b00334dfcf4ccf6..75457b30d813c1d3a359e346e418bbc4725dbea2 100644 (file)
@@ -476,6 +476,18 @@ static int __init vfp_init(void)
                 * in place; report VFP support to userspace.
                 */
                elf_hwcap |= HWCAP_VFP;
+#ifdef CONFIG_VFPv3
+               if (VFP_arch >= 3) {
+                       elf_hwcap |= HWCAP_VFPv3;
+
+                       /*
+                        * Check for VFPv3 D16. CPUs in this configuration
+                        * only have 16 x 64bit registers.
+                        */
+                       if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)
+                               elf_hwcap |= HWCAP_VFPv3D16;
+               }
+#endif
 #ifdef CONFIG_NEON
                /*
                 * Check for the presence of the Advanced SIMD