powerpc: make fork_idle() take the common "kernel thread" path in copy_thread()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
ea516b1154
commit
ab75819d39
@ -745,7 +745,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
|||||||
/* Copy registers */
|
/* Copy registers */
|
||||||
sp -= sizeof(struct pt_regs);
|
sp -= sizeof(struct pt_regs);
|
||||||
childregs = (struct pt_regs *) sp;
|
childregs = (struct pt_regs *) sp;
|
||||||
if (!regs) {
|
if (unlikely(p->flags & PF_KTHREAD)) {
|
||||||
struct thread_info *ti = (void *)task_stack_page(p);
|
struct thread_info *ti = (void *)task_stack_page(p);
|
||||||
memset(childregs, 0, sizeof(struct pt_regs));
|
memset(childregs, 0, sizeof(struct pt_regs));
|
||||||
childregs->gpr[1] = sp + sizeof(struct pt_regs);
|
childregs->gpr[1] = sp + sizeof(struct pt_regs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user