summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/rtrap.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-05 21:29:28 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:11:48 -0800
commit936f482af1743141d637483ec10eb881537c26dc (patch)
tree913da89a4d9f4038c510c9ecf2f5957b0f6d167f /arch/sparc64/kernel/rtrap.S
parent6e02493a7f33ac89e698b980a657d77ab2749eaf (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.S16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index ecfbbdc5612..e6130956307 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
1:
ldx [%sp + PTREGS_OFF + PT_V9_G6], %g6
ldx [%sp + PTREGS_OFF + PT_V9_G7], %g7
- wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate
+
+ /* Normal globals are restored, go to trap globals. */
+661: wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate
+ .section .gl_1insn_patch, "ax"
+ .word 661b
+ SET_GL(1)
+ .previous
+
ldx [%sp + PTREGS_OFF + PT_V9_I0], %i0
ldx [%sp + PTREGS_OFF + PT_V9_I1], %i1
@@ -304,6 +311,13 @@ user_rtt_fill_fixup:
mov %g6, %l1
wrpr %g0, 0x0, %tl
wrpr %g0, RTRAP_PSTATE, %pstate
+
+661: nop
+ .section .gl_1insn_patch, "ax"
+ .word 661b
+ SET_GL(0)
+ .previous
+
mov %l1, %g6
ldx [%g6 + TI_TASK], %g4
LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)