aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@cavium.com>2015-11-03 02:30:37 +0300
committerAndrey Konovalov <andrey.konovalov@linaro.org>2015-11-04 19:13:43 +0300
commite445e8b9325d9e946738b701858c674d0b2c001a (patch)
treed2b0574c125d19a9758f1f6d8c51159c49ac5791
parentee6e14d34697aed0321d355726dc7721d61e4d61 (diff)
arm64:ilp32: share HWCAP between LP64 and ILP32
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> Signed-off-by: Andrew Pinski <Andrew.Pinski@caviumnetworks.com> Reviewed-by: David Daney <david.daney@cavium.com>
-rw-r--r--arch/arm64/include/asm/hwcap.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h
index 0ad735166d9f..1e5361ebf39f 100644
--- a/arch/arm64/include/asm/hwcap.h
+++ b/arch/arm64/include/asm/hwcap.h
@@ -47,9 +47,17 @@
#define ELF_HWCAP (elf_hwcap)
#ifdef CONFIG_COMPAT
-#define COMPAT_ELF_HWCAP (compat_elf_hwcap)
-#define COMPAT_ELF_HWCAP2 (compat_elf_hwcap2)
extern unsigned int compat_elf_hwcap, compat_elf_hwcap2;
+#define COMPAT_ELF_HWCAP \
+ (is_a32_compat_task() \
+ ? compat_elf_hwcap \
+ : elf_hwcap)
+
+#define COMPAT_ELF_HWCAP2 \
+ (is_a32_compat_task() \
+ ? compat_elf_hwcap2 \
+ : 0)
+
#endif
extern unsigned long elf_hwcap;