aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-11 10:10:35 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-14 19:35:52 -0400
commit40792104b2550ee067f63c3ccc8ea04747dc5037 (patch)
tree0741b5e53e5dddd298eb583b8c937d2fc5faa0e5
parent138d1ce80ed96eff6638f454f0a1500a4aefd17b (diff)
powerpc: don't mess with r2 in copy_thread() and friends
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>
-rw-r--r--arch/powerpc/kernel/entry_64.S1
-rw-r--r--arch/powerpc/kernel/process.c2
2 files changed, 0 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 2eb766ad1c5c..8fdb05146ca0 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -373,7 +373,6 @@ _GLOBAL(ret_from_fork)
373_GLOBAL(ret_from_kernel_thread) 373_GLOBAL(ret_from_kernel_thread)
374 bl .schedule_tail 374 bl .schedule_tail
375 REST_NVGPRS(r1) 375 REST_NVGPRS(r1)
376 REST_GPR(2,r1)
377 mtlr r14 376 mtlr r14
378 mr r3,r15 377 mr r3,r15
379 blrl 378 blrl
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 9e685e26c2d1..7fc70f29edb3 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -751,12 +751,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
751 childregs->gpr[1] = sp + sizeof(struct pt_regs); 751 childregs->gpr[1] = sp + sizeof(struct pt_regs);
752#ifdef CONFIG_PPC64 752#ifdef CONFIG_PPC64
753 childregs->gpr[14] = *(unsigned long *)usp; 753 childregs->gpr[14] = *(unsigned long *)usp;
754 childregs->gpr[2] = ((unsigned long *)usp)[1],
755 clear_tsk_thread_flag(p, TIF_32BIT); 754 clear_tsk_thread_flag(p, TIF_32BIT);
756 childregs->softe = 1; 755 childregs->softe = 1;
757#else 756#else
758 childregs->gpr[14] = usp; /* function */ 757 childregs->gpr[14] = usp; /* function */
759 childregs->gpr[2] = (unsigned long) p;
760#endif 758#endif
761 childregs->gpr[15] = arg; 759 childregs->gpr[15] = arg;
762 p->thread.regs = NULL; /* no user register state */ 760 p->thread.regs = NULL; /* no user register state */