From: Andrew Pinski <apin...@cavium.com>

Reviewed-by: David Daney <dda...@caviumnetworks.com>
Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com>
Signed-off-by: Yury Norov <yno...@caviumnetworks.com>
Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com>
---
 arch/arm64/include/asm/hwcap.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h
index 0ad7351..1e5361e 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;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to