From: Al Viro Date: Sun, 21 Oct 2012 20:50:34 +0000 (-0400) Subject: powerpc: take dereferencing to ret_from_kernel_thread() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=53b50f9483cce47d1a7aefd1c9f442c094a5b1f7;p=linux-beck.git powerpc: take dereferencing to ret_from_kernel_thread() Signed-off-by: Al Viro --- diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 8fdb05146ca0..e9a906c27234 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -373,6 +373,7 @@ _GLOBAL(ret_from_fork) _GLOBAL(ret_from_kernel_thread) bl .schedule_tail REST_NVGPRS(r1) + ld r14, 0(r14) mtlr r14 mr r3,r15 blrl diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7fc70f29edb3..8c600c3f6613 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -749,12 +749,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, struct thread_info *ti = (void *)task_stack_page(p); memset(childregs, 0, sizeof(struct pt_regs)); childregs->gpr[1] = sp + sizeof(struct pt_regs); + childregs->gpr[14] = usp; /* function */ #ifdef CONFIG_PPC64 - childregs->gpr[14] = *(unsigned long *)usp; clear_tsk_thread_flag(p, TIF_32BIT); childregs->softe = 1; -#else - childregs->gpr[14] = usp; /* function */ #endif childregs->gpr[15] = arg; p->thread.regs = NULL; /* no user register state */