diff options
author | Andrew Pinski <apinski@cavium.com> | 2015-11-03 02:30:38 +0300 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2015-11-04 19:13:43 +0300 |
commit | ccf7891010394526c2e0eb1b807b5763691c5d8d (patch) | |
tree | 4704d531f4d5331568302496f0282356bbd03cbc | |
parent | e445e8b9325d9e946738b701858c674d0b2c001a (diff) |
arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads
If we have both ILP32 and AARCH32 compiled in, we need use the non compat start
thread for 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/processor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index a415dd066d88..e244cb4e391c 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) |