diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-06 00:29:28 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:11:48 -0500 |
commit | 936f482af1743141d637483ec10eb881537c26dc (patch) | |
tree | 913da89a4d9f4038c510c9ecf2f5957b0f6d167f /arch/sparc64/kernel/rtrap.S | |
parent | 6e02493a7f33ac89e698b980a657d77ab2749eaf (diff) |
[SPARC64]: Add initial code to twiddle %gl on trap entry/exit.
Instead of setting/clearing PSTATE_AG we have to change
the %gl register value on sun4v.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/rtrap.S')
-rw-r--r-- | arch/sparc64/kernel/rtrap.S | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index ecfbbdc56125..e6130956307f 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -230,7 +230,14 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 | |||
230 | 1: | 230 | 1: |
231 | ldx [%sp + PTREGS_OFF + PT_V9_G6], %g6 | 231 | ldx [%sp + PTREGS_OFF + PT_V9_G6], %g6 |
232 | ldx [%sp + PTREGS_OFF + PT_V9_G7], %g7 | 232 | ldx [%sp + PTREGS_OFF + PT_V9_G7], %g7 |
233 | wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate | 233 | |
234 | /* Normal globals are restored, go to trap globals. */ | ||
235 | 661: wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate | ||
236 | .section .gl_1insn_patch, "ax" | ||
237 | .word 661b | ||
238 | SET_GL(1) | ||
239 | .previous | ||
240 | |||
234 | ldx [%sp + PTREGS_OFF + PT_V9_I0], %i0 | 241 | ldx [%sp + PTREGS_OFF + PT_V9_I0], %i0 |
235 | ldx [%sp + PTREGS_OFF + PT_V9_I1], %i1 | 242 | ldx [%sp + PTREGS_OFF + PT_V9_I1], %i1 |
236 | 243 | ||
@@ -304,6 +311,13 @@ user_rtt_fill_fixup: | |||
304 | mov %g6, %l1 | 311 | mov %g6, %l1 |
305 | wrpr %g0, 0x0, %tl | 312 | wrpr %g0, 0x0, %tl |
306 | wrpr %g0, RTRAP_PSTATE, %pstate | 313 | wrpr %g0, RTRAP_PSTATE, %pstate |
314 | |||
315 | 661: nop | ||
316 | .section .gl_1insn_patch, "ax" | ||
317 | .word 661b | ||
318 | SET_GL(0) | ||
319 | .previous | ||
320 | |||
307 | mov %l1, %g6 | 321 | mov %l1, %g6 |
308 | ldx [%g6 + TI_TASK], %g4 | 322 | ldx [%g6 + TI_TASK], %g4 |
309 | LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3) | 323 | LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3) |