]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc: don't mess with r2 in copy_thread() and friends
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 11 Oct 2012 14:10:35 +0000 (10:10 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 14 Oct 2012 23:35:52 +0000 (19:35 -0400)
kernel_thread() callbacks are *not* in modules and are not going to
be there.  And it's not even read in ppc32 ret_from_kernel_thread(),
so no need to bother with it there either.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/process.c

index 2eb766ad1c5cf609711b107314fc59e3a614dcb3..8fdb05146ca0a8bc77a9f3c3dec0eb4f6f6a2be9 100644 (file)
@@ -373,7 +373,6 @@ _GLOBAL(ret_from_fork)
 _GLOBAL(ret_from_kernel_thread)
        bl      .schedule_tail
        REST_NVGPRS(r1)
-       REST_GPR(2,r1)
        mtlr    r14
        mr      r3,r15
        blrl
index 9e685e26c2d17ae89bd8ddfcf8f9bfcc22c43033..7fc70f29edb3830fc03fa24f9983066a17e240f9 100644 (file)
@@ -751,12 +751,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
                childregs->gpr[1] = sp + sizeof(struct pt_regs);
 #ifdef CONFIG_PPC64
                childregs->gpr[14] = *(unsigned long *)usp;
-               childregs->gpr[2] = ((unsigned long *)usp)[1],
                clear_tsk_thread_flag(p, TIF_32BIT);
                childregs->softe = 1;
 #else
                childregs->gpr[14] = usp;       /* function */
-               childregs->gpr[2] = (unsigned long) p;
 #endif
                childregs->gpr[15] = arg;
                p->thread.regs = NULL;  /* no user register state */