diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-26 19:37:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 23:43:40 -0500 |
commit | 39d91a9eafec7524482e70af76ccbe803dce5b8e (patch) | |
tree | 25b195b538b42b59fc3d4ca28c1abf66c4c6e645 /arch/openrisc/kernel/process.c | |
parent | cb56217362d87159b683175247d8d059df80aefa (diff) |
openrisc: switch to use of generic fork and clone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/openrisc/kernel/process.c')
-rw-r--r-- | arch/openrisc/kernel/process.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index e0874b8e09e4..6b853668369b 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c @@ -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 */ |