arm64: add AT_HWCAP2 support for 32-bit compat
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 3 Mar 2014 07:34:45 +0000 (07:34 +0000)
committerMark Brown <broonie@linaro.org>
Mon, 19 May 2014 23:53:06 +0000 (00:53 +0100)
Add support for the ELF auxv entry AT_HWCAP2 when running 32-bit
ELF binaries in compat mode.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 28964d32d495a0753986d464c48c8e1ae73699be)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/include/asm/hwcap.h
arch/arm64/kernel/setup.c

index 3a48433dfb570b5d61805de3acb6a36693a5683a..d39cec0fd7f74351be3af9100861beae29f469c8 100644 (file)
@@ -41,7 +41,8 @@
 
 #ifdef CONFIG_COMPAT
 #define COMPAT_ELF_HWCAP       (compat_elf_hwcap)
-extern unsigned int compat_elf_hwcap;
+#define COMPAT_ELF_HWCAP2      (compat_elf_hwcap2)
+extern unsigned int compat_elf_hwcap, compat_elf_hwcap2;
 #endif
 
 extern unsigned int elf_hwcap;
index cb14a98825b330487ac456e716ab186f5a4a16d6..74dde302151cb5dfbc2daae333254e674a755061 100644 (file)
@@ -68,6 +68,7 @@ EXPORT_SYMBOL_GPL(elf_hwcap);
                                 COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\
                                 COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV)
 unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT;
+unsigned int compat_elf_hwcap2 __read_mostly;
 #endif
 
 static const char *cpu_name;