Thread (35 messages) 35 messages, 2 authors, 2016-01-13
STALE3787d REVIEWED: 1 (0M)
Revisions (15)
  1. v5 [diff vs current]
  2. v6 [diff vs current]
  3. v6 [diff vs current]
  4. v6 [diff vs current]
  5. v6 current
  6. v6 [diff vs current]
  7. v6 [diff vs current]
  8. v6 [diff vs current]
  9. v7 [diff vs current]
  10. v7 [diff vs current]
  11. v7 [diff vs current]
  12. v7 [diff vs current]
  13. v7 [diff vs current]
  14. v8 [diff vs current]
  15. v9 [diff vs current]

[PATCH v6 12/21] arm64:ilp32: share HWCAP between LP64 and ILP32

From: Yury Norov <hidden>
Date: 2016-01-07 23:39:40
Also in: lkml
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

From: Andrew Pinski <redacted>

Signed-off-by: Andrew Pinski <redacted>
Signed-off-by: Philipp Tomsich <redacted>
Signed-off-by: Christoph Muellner <redacted>
Signed-off-by: Yury Norov <redacted>
Reviewed-by: David Daney <redacted>
---
 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 400b80b..bdb1ae6 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	\
+	  : (u32) elf_hwcap)
+
+#define COMPAT_ELF_HWCAP2	\
+	(is_a32_compat_task()	\
+	  ? compat_elf_hwcap2	\
+	  : (u32) (elf_hwcap >> 32))
+
 #endif
 
 enum {
-- 
2.5.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help