From 7279dc3e914635ab4b288ec39383272a06c466f3 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Wed, 11 Feb 2009 13:13:56 +0100 Subject: [ARM] 5388/1: Add hwcap bits for VFPv3 and VFPv3D16 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 Signed-off-by: Russell King --- arch/arm/vfp/vfpmodule.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/vfp/vfpmodule.c') diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 7e1239041b3..75457b30d81 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -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 -- cgit v1.2.3