]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc: take dereferencing to ret_from_kernel_thread()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 21 Oct 2012 20:50:34 +0000 (16:50 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 22 Oct 2012 02:25:11 +0000 (22:25 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/process.c

index 8fdb05146ca0a8bc77a9f3c3dec0eb4f6f6a2be9..e9a906c27234fe880a5c78bd9c80ef7835c712ab 100644 (file)
@@ -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
index 7fc70f29edb3830fc03fa24f9983066a17e240f9..8c600c3f6613a3fe8af25062f67e64cf1b894d3d 100644 (file)
@@ -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 */