aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/winfixup.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-03 00:55:10 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:11:35 -0500
commitffe483d55229fadbaf4cc7316d47024a24ecd1a2 (patch)
tree70bdb6c94d5b3512a7b2a3ff06979ac2e4e869bf /arch/sparc64/kernel/winfixup.S
parent92704a1c63c3b481870d02636d0b5a70c7e21cd1 (diff)
[SPARC64]: Add explicit register args to trap state loading macros.
This, as well as making the code cleaner, allows a simplification in the TSB miss handling path. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/winfixup.S')
-rw-r--r--arch/sparc64/kernel/winfixup.S18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/sparc64/kernel/winfixup.S b/arch/sparc64/kernel/winfixup.S
index 320a762d0519..211021ae6e8a 100644
--- a/arch/sparc64/kernel/winfixup.S
+++ b/arch/sparc64/kernel/winfixup.S
@@ -40,7 +40,7 @@ set_pcontext:
40 */ 40 */
41 .globl fill_fixup, spill_fixup 41 .globl fill_fixup, spill_fixup
42fill_fixup: 42fill_fixup:
43 TRAP_LOAD_THREAD_REG 43 TRAP_LOAD_THREAD_REG(%g6, %g1)
44 rdpr %tstate, %g1 44 rdpr %tstate, %g1
45 andcc %g1, TSTATE_PRIV, %g0 45 andcc %g1, TSTATE_PRIV, %g0
46 or %g4, FAULT_CODE_WINFIXUP, %g4 46 or %g4, FAULT_CODE_WINFIXUP, %g4
@@ -86,7 +86,7 @@ fill_fixup:
86 wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate 86 wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate
87 mov %o7, %g6 87 mov %o7, %g6
88 ldx [%g6 + TI_TASK], %g4 88 ldx [%g6 + TI_TASK], %g4
89 LOAD_PER_CPU_BASE(%g1, %g2, %g3) 89 LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)
90 90
91 /* This is the same as below, except we handle this a bit special 91 /* This is the same as below, except we handle this a bit special
92 * since we must preserve %l5 and %l6, see comment above. 92 * since we must preserve %l5 and %l6, see comment above.
@@ -105,7 +105,7 @@ fill_fixup:
105 * do not touch %g7 or %g2 so we handle the two cases fine. 105 * do not touch %g7 or %g2 so we handle the two cases fine.
106 */ 106 */
107spill_fixup: 107spill_fixup:
108 TRAP_LOAD_THREAD_REG 108 TRAP_LOAD_THREAD_REG(%g6, %g1)
109 ldx [%g6 + TI_FLAGS], %g1 109 ldx [%g6 + TI_FLAGS], %g1
110 andcc %g1, _TIF_32BIT, %g0 110 andcc %g1, _TIF_32BIT, %g0
111 ldub [%g6 + TI_WSAVED], %g1 111 ldub [%g6 + TI_WSAVED], %g1
@@ -181,7 +181,7 @@ winfix_mna:
181 wrpr %g3, %tnpc 181 wrpr %g3, %tnpc
182 done 182 done
183fill_fixup_mna: 183fill_fixup_mna:
184 TRAP_LOAD_THREAD_REG 184 TRAP_LOAD_THREAD_REG(%g6, %g1)
185 rdpr %tstate, %g1 185 rdpr %tstate, %g1
186 andcc %g1, TSTATE_PRIV, %g0 186 andcc %g1, TSTATE_PRIV, %g0
187 be,pt %xcc, window_mna_from_user_common 187 be,pt %xcc, window_mna_from_user_common
@@ -209,14 +209,14 @@ fill_fixup_mna:
209 wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate 209 wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate
210 mov %o7, %g6 ! Get current back. 210 mov %o7, %g6 ! Get current back.
211 ldx [%g6 + TI_TASK], %g4 ! Finish it. 211 ldx [%g6 + TI_TASK], %g4 ! Finish it.
212 LOAD_PER_CPU_BASE(%g1, %g2, %g3) 212 LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)
213 call mem_address_unaligned 213 call mem_address_unaligned
214 add %sp, PTREGS_OFF, %o0 214 add %sp, PTREGS_OFF, %o0
215 215
216 b,pt %xcc, rtrap 216 b,pt %xcc, rtrap
217 nop ! yes, the nop is correct 217 nop ! yes, the nop is correct
218spill_fixup_mna: 218spill_fixup_mna:
219 TRAP_LOAD_THREAD_REG 219 TRAP_LOAD_THREAD_REG(%g6, %g1)
220 ldx [%g6 + TI_FLAGS], %g1 220 ldx [%g6 + TI_FLAGS], %g1
221 andcc %g1, _TIF_32BIT, %g0 221 andcc %g1, _TIF_32BIT, %g0
222 ldub [%g6 + TI_WSAVED], %g1 222 ldub [%g6 + TI_WSAVED], %g1
@@ -284,7 +284,7 @@ winfix_dax:
284 wrpr %g3, %tnpc 284 wrpr %g3, %tnpc
285 done 285 done
286fill_fixup_dax: 286fill_fixup_dax:
287 TRAP_LOAD_THREAD_REG 287 TRAP_LOAD_THREAD_REG(%g6, %g1)
288 rdpr %tstate, %g1 288 rdpr %tstate, %g1
289 andcc %g1, TSTATE_PRIV, %g0 289 andcc %g1, TSTATE_PRIV, %g0
290 be,pt %xcc, window_dax_from_user_common 290 be,pt %xcc, window_dax_from_user_common
@@ -312,14 +312,14 @@ fill_fixup_dax:
312 wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate 312 wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate
313 mov %o7, %g6 ! Get current back. 313 mov %o7, %g6 ! Get current back.
314 ldx [%g6 + TI_TASK], %g4 ! Finish it. 314 ldx [%g6 + TI_TASK], %g4 ! Finish it.
315 LOAD_PER_CPU_BASE(%g1, %g2, %g3) 315 LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)
316 call spitfire_data_access_exception 316 call spitfire_data_access_exception
317 add %sp, PTREGS_OFF, %o0 317 add %sp, PTREGS_OFF, %o0
318 318
319 b,pt %xcc, rtrap 319 b,pt %xcc, rtrap
320 nop ! yes, the nop is correct 320 nop ! yes, the nop is correct
321spill_fixup_dax: 321spill_fixup_dax:
322 TRAP_LOAD_THREAD_REG 322 TRAP_LOAD_THREAD_REG(%g6, %g1)
323 ldx [%g6 + TI_FLAGS], %g1 323 ldx [%g6 + TI_FLAGS], %g1
324 andcc %g1, _TIF_32BIT, %g0 324 andcc %g1, _TIF_32BIT, %g0
325 ldub [%g6 + TI_WSAVED], %g1 325 ldub [%g6 + TI_WSAVED], %g1