diff options
author | Will Deacon <will.deacon@arm.com> | 2011-06-08 11:42:43 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2011-07-07 19:20:52 +0100 |
commit | 18b9dc130c33de2d1fd46bd668e67d0e1a544b16 (patch) | |
tree | 6baac3359f06737ab27d28d2c29311334aa39313 /arch/arm/vfp | |
parent | 254cdf8ec39653d19cce71b6622f38a6b62ac3a8 (diff) | |
download | linux-stable-18b9dc130c33de2d1fd46bd668e67d0e1a544b16.tar.gz linux-stable-18b9dc130c33de2d1fd46bd668e67d0e1a544b16.tar.bz2 linux-stable-18b9dc130c33de2d1fd46bd668e67d0e1a544b16.zip |
ARM: vfp: add VFPv4 capability detection and populate elf_hwcap
The presence of VFPv4 cannot be detected simply by looking at the FPSID
subarchitecture field, as a value >= 2 signifies the architecture as
VFPv3 or later.
This patch reads from MVFR1 to check whether or not the fused multiply
accumulate instructions are supported. Since these are introduced with
VFPv4, this tells us what we need to know.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/vfp')
-rw-r--r-- | arch/arm/vfp/vfpmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index f25e7ec89416..650d90be0f9f 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -582,7 +582,6 @@ static int __init vfp_init(void) elf_hwcap |= HWCAP_VFPv3D16; } #endif -#ifdef CONFIG_NEON /* * Check for the presence of the Advanced SIMD * load/store instructions, integer and single @@ -590,10 +589,13 @@ static int __init vfp_init(void) * for NEON if the hardware has the MVFR registers. */ if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { +#ifdef CONFIG_NEON if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) elf_hwcap |= HWCAP_NEON; - } #endif + if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) + elf_hwcap |= HWCAP_VFPv4; + } } return 0; } |