aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/entry.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-28 14:20:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-16 19:03:53 -0400
commitab3486813bbbd9e74efb4c130183f3994dada4bd (patch)
tree360d3fd62ca0b9d7940573091b5d700c4471b78a /arch/sparc/kernel/entry.S
parentc78e06430ea621ce59d20cb899a9a86bdcf4487b (diff)
sparc32: switch to generic kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc/kernel/entry.S')
-rw-r--r--arch/sparc/kernel/entry.S11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 6114672a1b0..36b35e54a6d 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -990,8 +990,15 @@ ret_from_kernel_thread:
ld [%sp + STACKFRAME_SZ + PT_G1], %l0
call %l0
ld [%sp + STACKFRAME_SZ + PT_G2], %o0
- call do_exit /* won't return */
- clr %o0
+ rd %psr, %l1
+ ld [%sp + STACKFRAME_SZ + PT_PSR], %l0
+ andn %l0, PSR_CWP, %l0
+ nop
+ and %l1, PSR_CWP, %l1
+ or %l0, %l1, %l0
+ st %l0, [%sp + STACKFRAME_SZ + PT_PSR]
+ b ret_sys_call
+ mov 0, %o0
/* Linux native system calls enter here... */
.align 4