diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-16 19:23:45 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:19 -0500 |
commit | af02bec66294c76fba181c665c68a31fd4392020 (patch) | |
tree | f741bdd782c719cba6dd8efe01f107a46d115a27 /arch/sparc64 | |
parent | 4ff7ac417d4b628c23df3ae8301d17e29e6e8f16 (diff) |
[SPARC64]: Fix return from trap on SUN4V.
We need to set the global register set _AND_ disable
PSTATE_IE in %pstate. The original patch sequence was
leaving PSTATE_IE enabled when returning to kernel mode,
oops.
This fixes the random register corruption being seen
on SUN4V.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/rtrap.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 551f71982008..1e724fe172ae 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -234,8 +234,10 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 | |||
234 | 234 | ||
235 | /* Normal globals are restored, go to trap globals. */ | 235 | /* Normal globals are restored, go to trap globals. */ |
236 | 661: wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate | 236 | 661: wrpr %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate |
237 | .section .sun4v_1insn_patch, "ax" | 237 | nop |
238 | .section .sun4v_2insn_patch, "ax" | ||
238 | .word 661b | 239 | .word 661b |
240 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
239 | SET_GL(1) | 241 | SET_GL(1) |
240 | .previous | 242 | .previous |
241 | 243 | ||