diff options
Diffstat (limited to 'arch/sparc/kernel/rtrap_64.S')
-rw-r--r-- | arch/sparc/kernel/rtrap_64.S | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S index fd3cee4d117..e829a42b713 100644 --- a/arch/sparc/kernel/rtrap_64.S +++ b/arch/sparc/kernel/rtrap_64.S | |||
@@ -65,48 +65,6 @@ __handle_user_windows: | |||
65 | ba,pt %xcc, __handle_user_windows_continue | 65 | ba,pt %xcc, __handle_user_windows_continue |
66 | 66 | ||
67 | andn %l1, %l4, %l1 | 67 | andn %l1, %l4, %l1 |
68 | __handle_perfctrs: | ||
69 | call update_perfctrs | ||
70 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
71 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
72 | ldub [%g6 + TI_WSAVED], %o2 | ||
73 | brz,pt %o2, 1f | ||
74 | nop | ||
75 | /* Redo userwin+sched+sig checks */ | ||
76 | call fault_in_user_windows | ||
77 | |||
78 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
79 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
80 | ldx [%g6 + TI_FLAGS], %l0 | ||
81 | andcc %l0, _TIF_NEED_RESCHED, %g0 | ||
82 | be,pt %xcc, 1f | ||
83 | |||
84 | nop | ||
85 | call schedule | ||
86 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
87 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
88 | ldx [%g6 + TI_FLAGS], %l0 | ||
89 | 1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | ||
90 | |||
91 | be,pt %xcc, __handle_perfctrs_continue | ||
92 | sethi %hi(TSTATE_PEF), %o0 | ||
93 | mov %l5, %o1 | ||
94 | add %sp, PTREGS_OFF, %o0 | ||
95 | mov %l0, %o2 | ||
96 | call do_notify_resume | ||
97 | |||
98 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
99 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
100 | /* Signal delivery can modify pt_regs tstate, so we must | ||
101 | * reload it. | ||
102 | */ | ||
103 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | ||
104 | sethi %hi(0xf << 20), %l4 | ||
105 | and %l1, %l4, %l4 | ||
106 | andn %l1, %l4, %l1 | ||
107 | ba,pt %xcc, __handle_perfctrs_continue | ||
108 | |||
109 | sethi %hi(TSTATE_PEF), %o0 | ||
110 | __handle_userfpu: | 68 | __handle_userfpu: |
111 | rd %fprs, %l5 | 69 | rd %fprs, %l5 |
112 | andcc %l5, FPRS_FEF, %g0 | 70 | andcc %l5, FPRS_FEF, %g0 |
@@ -191,9 +149,9 @@ rtrap_no_irq_enable: | |||
191 | * take until the next local IRQ before the signal/resched | 149 | * take until the next local IRQ before the signal/resched |
192 | * event would be handled. | 150 | * event would be handled. |
193 | * | 151 | * |
194 | * This also means that if we have to deal with performance | 152 | * This also means that if we have to deal with user |
195 | * counters or user windows, we have to redo all of these | 153 | * windows, we have to redo all of these sched+signal checks |
196 | * sched+signal checks with IRQs disabled. | 154 | * with IRQs disabled. |
197 | */ | 155 | */ |
198 | to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 156 | to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
199 | wrpr 0, %pil | 157 | wrpr 0, %pil |
@@ -214,12 +172,8 @@ __handle_signal_continue: | |||
214 | brnz,pn %o2, __handle_user_windows | 172 | brnz,pn %o2, __handle_user_windows |
215 | nop | 173 | nop |
216 | __handle_user_windows_continue: | 174 | __handle_user_windows_continue: |
217 | ldx [%g6 + TI_FLAGS], %l5 | ||
218 | andcc %l5, _TIF_PERFCTR, %g0 | ||
219 | sethi %hi(TSTATE_PEF), %o0 | 175 | sethi %hi(TSTATE_PEF), %o0 |
220 | bne,pn %xcc, __handle_perfctrs | 176 | andcc %l1, %o0, %g0 |
221 | __handle_perfctrs_continue: | ||
222 | andcc %l1, %o0, %g0 | ||
223 | 177 | ||
224 | /* This fpdepth clear is necessary for non-syscall rtraps only */ | 178 | /* This fpdepth clear is necessary for non-syscall rtraps only */ |
225 | user_nowork: | 179 | user_nowork: |