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/etrap.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/etrap.S')
-rw-r--r-- | arch/sparc64/kernel/etrap.S | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S index f2556146a735..4d644949ad49 100644 --- a/arch/sparc64/kernel/etrap.S +++ b/arch/sparc64/kernel/etrap.S | |||
@@ -102,7 +102,14 @@ etrap_save: save %g2, -STACK_BIAS, %sp | |||
102 | 2: mov %g4, %l4 | 102 | 2: mov %g4, %l4 |
103 | mov %g5, %l5 | 103 | mov %g5, %l5 |
104 | add %g7, 4, %l2 | 104 | add %g7, 4, %l2 |
105 | wrpr %g0, ETRAP_PSTATE1, %pstate | 105 | |
106 | /* Go to trap time globals so we can save them. */ | ||
107 | 661: wrpr %g0, ETRAP_PSTATE1, %pstate | ||
108 | .section .gl_1insn_patch, "ax" | ||
109 | .word 661b | ||
110 | SET_GL(0) | ||
111 | .previous | ||
112 | |||
106 | stx %g1, [%sp + PTREGS_OFF + PT_V9_G1] | 113 | stx %g1, [%sp + PTREGS_OFF + PT_V9_G1] |
107 | stx %g2, [%sp + PTREGS_OFF + PT_V9_G2] | 114 | stx %g2, [%sp + PTREGS_OFF + PT_V9_G2] |
108 | sllx %l7, 24, %l7 | 115 | sllx %l7, 24, %l7 |
@@ -195,9 +202,15 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself. | |||
195 | rdpr %tt, %g3 | 202 | rdpr %tt, %g3 |
196 | stx %g3, [%g2 + STACK_BIAS + 0x78] | 203 | stx %g3, [%g2 + STACK_BIAS + 0x78] |
197 | 204 | ||
198 | wrpr %g1, %tl | ||
199 | stx %g1, [%g2 + STACK_BIAS + 0x80] | 205 | stx %g1, [%g2 + STACK_BIAS + 0x80] |
200 | 206 | ||
207 | wrpr %g0, 1, %tl | ||
208 | 661: nop | ||
209 | .section .gl_1insn_patch, "ax" | ||
210 | .word 661b | ||
211 | SET_GL(1) | ||
212 | .previous | ||
213 | |||
201 | rdpr %tstate, %g1 | 214 | rdpr %tstate, %g1 |
202 | sub %g2, STACKFRAME_SZ + TRACEREG_SZ - STACK_BIAS, %g2 | 215 | sub %g2, STACKFRAME_SZ + TRACEREG_SZ - STACK_BIAS, %g2 |
203 | ba,pt %xcc, 1b | 216 | ba,pt %xcc, 1b |