Skip to content

Commit

Permalink
powerpc: don't mess with r2 in copy_thread() and friends
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Oct 14, 2012
1 parent 138d1ce commit 4079210
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion arch/powerpc/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 4079210

Please sign in to comment.