Thread (22 messages) 22 messages, 2 authors, 2015-11-05
STALE3832d REVIEWED: 1 (0M)
Revisions (15)
  1. v5 [diff vs current]
  2. v6 current
  3. v6 [diff vs current]
  4. v6 [diff vs current]
  5. v6 [diff vs 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 09/17] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads

From: Yury Norov <hidden>
Date: 2015-11-02 23:33:42
Also in: lkml
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

From: Andrew Pinski <redacted>

If we have both ILP32 and AARCH32 compiled in, we need use the non compat start
thread for ILP32.

Signed-off-by: Philipp Tomsich <redacted>
Signed-off-by: Christoph Muellner <redacted>
Signed-off-by: Yury Norov <redacted>
Signed-off-by: Andrew Pinski <redacted>
Reviewed-by: David Daney <redacted>
---
 arch/arm64/include/asm/processor.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index a415dd0..e244cb4 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -28,6 +28,7 @@
 #ifdef __KERNEL__
 
 #include <linux/string.h>
+#include <linux/thread_info.h>
 
 #include <asm/fpsimd.h>
 #include <asm/hw_breakpoint.h>
@@ -123,6 +124,15 @@ static inline void start_thread(struct pt_regs *regs, unsigned long pc,
 static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
 				       unsigned long sp)
 {
+#ifdef CONFIG_ARM64_ILP32
+	/* ILP32 thread are started the same way as LP64 threads.
+	   Note we cannot use is_ilp32_compat_task here as that
+	   would introduce a header depency issue.  */
+	if (test_thread_flag(TIF_32BIT_AARCH64)) {
+		start_thread(regs, pc, sp);
+		return;
+	}
+#endif
 	start_thread_common(regs, pc);
 	regs->pstate = COMPAT_PSR_MODE_USR;
 	if (pc & 1)
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help