aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-21 16:50:34 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-21 22:25:11 -0400
commit53b50f9483cce47d1a7aefd1c9f442c094a5b1f7 (patch)
tree7d31f189018499916089eda03e2e5f13f207db44
parent40792104b2550ee067f63c3ccc8ea04747dc5037 (diff)
powerpc: take dereferencing to ret_from_kernel_thread()
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.c4
2 files changed, 2 insertions, 3 deletions
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)
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 ld r14, 0(r14)
376 mtlr r14 377 mtlr r14
377 mr r3,r15 378 mr r3,r15
378 blrl 379 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,
749 struct thread_info *ti = (void *)task_stack_page(p); 749 struct thread_info *ti = (void *)task_stack_page(p);
750 memset(childregs, 0, sizeof(struct pt_regs)); 750 memset(childregs, 0, sizeof(struct pt_regs));
751 childregs->gpr[1] = sp + sizeof(struct pt_regs); 751 childregs->gpr[1] = sp + sizeof(struct pt_regs);
752 childregs->gpr[14] = usp; /* function */
752#ifdef CONFIG_PPC64 753#ifdef CONFIG_PPC64
753 childregs->gpr[14] = *(unsigned long *)usp;
754 clear_tsk_thread_flag(p, TIF_32BIT); 754 clear_tsk_thread_flag(p, TIF_32BIT);
755 childregs->softe = 1; 755 childregs->softe = 1;
756#else
757 childregs->gpr[14] = usp; /* function */
758#endif 756#endif
759 childregs->gpr[15] = arg; 757 childregs->gpr[15] = arg;
760 p->thread.regs = NULL; /* no user register state */ 758 p->thread.regs = NULL; /* no user register state */