Skip to content

Commit

Permalink
powerpc: take dereferencing to ret_from_kernel_thread()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 22, 2012
1 parent 4079210 commit 53b50f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 53b50f9

Please sign in to comment.