diff mbox

[v6,10/20] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads

Message ID 1450215766-14765-11-git-send-email-ynorov@caviumnetworks.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yury Norov Dec. 15, 2015, 9:42 p.m. UTC
From: Andrew Pinski <apinski@cavium.com>

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

Reviewed-by: David Daney <ddaney@caviumnetworks.com>
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>
---
 arch/arm64/include/asm/processor.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Arnd Bergmann Dec. 16, 2015, 3:50 p.m. UTC | #1
On Wednesday 16 December 2015 00:42:36 Yury Norov wrote:
> +#ifdef CONFIG_ARM64_ILP32
> +       /* ILP32 threads are started the same way as LP64 threads. */
> +       if (is_ilp32_compat_task()) {
> +               start_thread(regs, pc, sp);
> +               return;
> +       }
> +#endif
> 

Just a small style comment, but I think you can just leave out the #ifdef,
as is_ilp32_compat_task() will already return false if that is disabled.

	Arnd
Yury Norov Dec. 18, 2015, 1:57 p.m. UTC | #2
On Wed, Dec 16, 2015 at 04:50:18PM +0100, Arnd Bergmann wrote:
> On Wednesday 16 December 2015 00:42:36 Yury Norov wrote:
> > +#ifdef CONFIG_ARM64_ILP32
> > +       /* ILP32 threads are started the same way as LP64 threads. */
> > +       if (is_ilp32_compat_task()) {
> > +               start_thread(regs, pc, sp);
> > +               return;
> > +       }
> > +#endif
> > 
> 
> Just a small style comment, but I think you can just leave out the #ifdef,
> as is_ilp32_compat_task() will already return false if that is disabled.
> 
> 	Arnd

Missed it, thank you.
diff mbox

Patch

diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index f1ba514..e365280 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -124,6 +124,13 @@  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 threads are started the same way as LP64 threads. */
+	if (is_ilp32_compat_task()) {
+		start_thread(regs, pc, sp);
+		return;
+	}
+#endif
 	start_thread_common(regs, pc);
 	regs->pstate = COMPAT_PSR_MODE_USR;
 	if (pc & 1)