path: root/arch/sparc/kernel/syscalls.S
diff options
authorLinus Torvalds <>2012-12-04 08:42:29 -0800
committerLinus Torvalds <>2012-12-04 08:42:29 -0800
commit609e3ff3ff797c0ddba1c61c8eb83923586ed079 (patch)
tree2fe9f88a574b3fb913e5c51962e4c39fce11e334 /arch/sparc/kernel/syscalls.S
parent57302e0ddf8a210a66fd8a1a2fa50844863b5ded (diff)
parent0032c857454581510de1ca12615de5e38e543c92 (diff)
Merge git://
Pull sparc fixes from David Miller: "Two small fixes for Sparc, nobody uses sparc, so these are low risk :-) 1) Piggyback is too picky about the symbol types that _start and _end have in the final kernel image, and it thus breaks with newer binutils. Future proof by getting rid of the symbol type checks. 2) exit_group() should kill register windows on sparc64 the same way we do for plain exit(). Thanks to Al Viro for spotting this." * git:// sparc: Fix piggyback with newer binutils. sparc64: exit_group should kill register windows just like plain exit.
Diffstat (limited to 'arch/sparc/kernel/syscalls.S')
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
index 7f5f65d0b3fd..bf2347794e33 100644
--- a/arch/sparc/kernel/syscalls.S
+++ b/arch/sparc/kernel/syscalls.S
@@ -118,10 +118,20 @@ ret_from_syscall:
ba,pt %xcc, ret_sys_call
ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0
+ .globl sparc_exit_group
+ .type sparc_exit_group,#function
+ sethi %hi(sys_exit_group), %g7
+ ba,pt %xcc, 1f
+ or %g7, %lo(sys_exit_group), %g7
+ .size sparc_exit_group,.-sparc_exit_group
.globl sparc_exit
.type sparc_exit,#function
- rdpr %pstate, %g2
+ sethi %hi(sys_exit), %g7
+ or %g7, %lo(sys_exit), %g7
+1: rdpr %pstate, %g2
wrpr %g2, PSTATE_IE, %pstate
rdpr %otherwin, %g1
rdpr %cansave, %g3
@@ -129,7 +139,7 @@ sparc_exit:
wrpr %g3, 0x0, %cansave
wrpr %g0, 0x0, %otherwin
wrpr %g2, 0x0, %pstate
- ba,pt %xcc, sys_exit
+ jmpl %g7, %g0
stb %g0, [%g6 + TI_WSAVED]
.size sparc_exit,.-sparc_exit