Commit caebf910 authored by Al Viro's avatar Al Viro Committed by David S. Miller

sparc: keep calling do_signal() as long as pending signals remain

Analog of what commit 494486a1 had done
to alpha (another architecture with similar bug).

One note: in rtrap_32.S part clr %l6 has been a rudiment of left after
commit 28e61036 (sparc: Fix debugger syscall
restart interactions) has killed %l6 use in there.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b18cae42
...@@ -78,9 +78,9 @@ signal_p: ...@@ -78,9 +78,9 @@ signal_p:
call do_notify_resume call do_notify_resume
add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr
/* Fall through. */ b signal_p
ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr ld [%curptr + TI_FLAGS], %g2
clr %l6
ret_trap_continue: ret_trap_continue:
sethi %hi(PSR_SYSCALL), %g1 sethi %hi(PSR_SYSCALL), %g1
andn %t_psr, %g1, %t_psr andn %t_psr, %g1, %t_psr
......
...@@ -34,37 +34,9 @@ __handle_preemption: ...@@ -34,37 +34,9 @@ __handle_preemption:
__handle_user_windows: __handle_user_windows:
call fault_in_user_windows call fault_in_user_windows
wrpr %g0, RTRAP_PSTATE, %pstate wrpr %g0, RTRAP_PSTATE, %pstate
wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate ba,pt %xcc, __handle_preemption_continue
/* Redo sched+sig checks */ wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
ldx [%g6 + TI_FLAGS], %l0
andcc %l0, _TIF_NEED_RESCHED, %g0
be,pt %xcc, 1f
nop
call schedule
wrpr %g0, RTRAP_PSTATE, %pstate
wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
ldx [%g6 + TI_FLAGS], %l0
1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0
be,pt %xcc, __handle_user_windows_continue
nop
mov %l5, %o1
add %sp, PTREGS_OFF, %o0
mov %l0, %o2
call do_notify_resume
wrpr %g0, RTRAP_PSTATE, %pstate
wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
/* Signal delivery can modify pt_regs tstate, so we must
* reload it.
*/
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
sethi %hi(0xf << 20), %l4
and %l1, %l4, %l4
ba,pt %xcc, __handle_user_windows_continue
andn %l1, %l4, %l1
__handle_userfpu: __handle_userfpu:
rd %fprs, %l5 rd %fprs, %l5
andcc %l5, FPRS_FEF, %g0 andcc %l5, FPRS_FEF, %g0
...@@ -87,7 +59,7 @@ __handle_signal: ...@@ -87,7 +59,7 @@ __handle_signal:
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
sethi %hi(0xf << 20), %l4 sethi %hi(0xf << 20), %l4
and %l1, %l4, %l4 and %l1, %l4, %l4
ba,pt %xcc, __handle_signal_continue ba,pt %xcc, __handle_preemption_continue
andn %l1, %l4, %l1 andn %l1, %l4, %l1
/* When returning from a NMI (%pil==15) interrupt we want to /* When returning from a NMI (%pil==15) interrupt we want to
...@@ -177,11 +149,9 @@ __handle_preemption_continue: ...@@ -177,11 +149,9 @@ __handle_preemption_continue:
bne,pn %xcc, __handle_preemption bne,pn %xcc, __handle_preemption
andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0
bne,pn %xcc, __handle_signal bne,pn %xcc, __handle_signal
__handle_signal_continue:
ldub [%g6 + TI_WSAVED], %o2 ldub [%g6 + TI_WSAVED], %o2
brnz,pn %o2, __handle_user_windows brnz,pn %o2, __handle_user_windows
nop nop
__handle_user_windows_continue:
sethi %hi(TSTATE_PEF), %o0 sethi %hi(TSTATE_PEF), %o0
andcc %l1, %o0, %g0 andcc %l1, %o0, %g0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment