diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-09-24 00:52:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-26 11:59:55 -0400 |
commit | caebf9103be2e6a5330c6395a1f9f213edb0c8df (patch) | |
tree | 06275a7bfb1226a42ac7be136b9c07e92086521c /arch/sparc | |
parent | b18cae4224bde7e5a332c19bc99247b2098ea232 (diff) |
sparc: keep calling do_signal() as long as pending signals remain
Analog of what commit 494486a1d2697f2153199b6501ab5b4d6e15a2bb 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 28e6103665301ce60634e8a77f0b657c6cc099de (sparc: Fix debugger syscall
restart interactions) has killed %l6 use in there.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/rtrap_32.S | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/rtrap_64.S | 36 |
2 files changed, 6 insertions, 36 deletions
diff --git a/arch/sparc/kernel/rtrap_32.S b/arch/sparc/kernel/rtrap_32.S index 4da2e1f66290..5f5f74c2c2ca 100644 --- a/arch/sparc/kernel/rtrap_32.S +++ b/arch/sparc/kernel/rtrap_32.S | |||
@@ -78,9 +78,9 @@ signal_p: | |||
78 | call do_notify_resume | 78 | call do_notify_resume |
79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr | 79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr |
80 | 80 | ||
81 | /* Fall through. */ | 81 | b signal_p |
82 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr | 82 | ld [%curptr + TI_FLAGS], %g2 |
83 | clr %l6 | 83 | |
84 | ret_trap_continue: | 84 | ret_trap_continue: |
85 | sethi %hi(PSR_SYSCALL), %g1 | 85 | sethi %hi(PSR_SYSCALL), %g1 |
86 | andn %t_psr, %g1, %t_psr | 86 | andn %t_psr, %g1, %t_psr |
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S index 090b9e9ad5e3..77f1b95e0806 100644 --- a/arch/sparc/kernel/rtrap_64.S +++ b/arch/sparc/kernel/rtrap_64.S | |||
@@ -34,37 +34,9 @@ __handle_preemption: | |||
34 | __handle_user_windows: | 34 | __handle_user_windows: |
35 | call fault_in_user_windows | 35 | call fault_in_user_windows |
36 | wrpr %g0, RTRAP_PSTATE, %pstate | 36 | wrpr %g0, RTRAP_PSTATE, %pstate |
37 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 37 | ba,pt %xcc, __handle_preemption_continue |
38 | /* Redo sched+sig checks */ | 38 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
39 | ldx [%g6 + TI_FLAGS], %l0 | ||
40 | andcc %l0, _TIF_NEED_RESCHED, %g0 | ||
41 | |||
42 | be,pt %xcc, 1f | ||
43 | nop | ||
44 | call schedule | ||
45 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
46 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
47 | ldx [%g6 + TI_FLAGS], %l0 | ||
48 | |||
49 | 1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | ||
50 | be,pt %xcc, __handle_user_windows_continue | ||
51 | nop | ||
52 | mov %l5, %o1 | ||
53 | add %sp, PTREGS_OFF, %o0 | ||
54 | mov %l0, %o2 | ||
55 | |||
56 | call do_notify_resume | ||
57 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
58 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
59 | /* Signal delivery can modify pt_regs tstate, so we must | ||
60 | * reload it. | ||
61 | */ | ||
62 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | ||
63 | sethi %hi(0xf << 20), %l4 | ||
64 | and %l1, %l4, %l4 | ||
65 | ba,pt %xcc, __handle_user_windows_continue | ||
66 | 39 | ||
67 | andn %l1, %l4, %l1 | ||
68 | __handle_userfpu: | 40 | __handle_userfpu: |
69 | rd %fprs, %l5 | 41 | rd %fprs, %l5 |
70 | andcc %l5, FPRS_FEF, %g0 | 42 | andcc %l5, FPRS_FEF, %g0 |
@@ -87,7 +59,7 @@ __handle_signal: | |||
87 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | 59 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 |
88 | sethi %hi(0xf << 20), %l4 | 60 | sethi %hi(0xf << 20), %l4 |
89 | and %l1, %l4, %l4 | 61 | and %l1, %l4, %l4 |
90 | ba,pt %xcc, __handle_signal_continue | 62 | ba,pt %xcc, __handle_preemption_continue |
91 | andn %l1, %l4, %l1 | 63 | andn %l1, %l4, %l1 |
92 | 64 | ||
93 | /* When returning from a NMI (%pil==15) interrupt we want to | 65 | /* When returning from a NMI (%pil==15) interrupt we want to |
@@ -177,11 +149,9 @@ __handle_preemption_continue: | |||
177 | bne,pn %xcc, __handle_preemption | 149 | bne,pn %xcc, __handle_preemption |
178 | andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | 150 | andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 |
179 | bne,pn %xcc, __handle_signal | 151 | bne,pn %xcc, __handle_signal |
180 | __handle_signal_continue: | ||
181 | ldub [%g6 + TI_WSAVED], %o2 | 152 | ldub [%g6 + TI_WSAVED], %o2 |
182 | brnz,pn %o2, __handle_user_windows | 153 | brnz,pn %o2, __handle_user_windows |
183 | nop | 154 | nop |
184 | __handle_user_windows_continue: | ||
185 | sethi %hi(TSTATE_PEF), %o0 | 155 | sethi %hi(TSTATE_PEF), %o0 |
186 | andcc %l1, %o0, %g0 | 156 | andcc %l1, %o0, %g0 |
187 | 157 | ||