openrisc: switch to use of generic fork and clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2012-10-26 19:37:49 -04:00
parent cb56217362
commit 39d91a9eaf
6 changed files with 19 additions and 66 deletions

View file

@ -168,9 +168,10 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
kregs->gpr[20] = usp; /* fn, kernel thread */
kregs->gpr[22] = arg;
} else {
*userregs = *regs;
*userregs = *current_pt_regs();
userregs->sp = usp;
if (usp)
userregs->sp = usp;
userregs->gpr[11] = 0; /* Result from fork() */
kregs->gpr[20] = 0; /* Userspace thread */