diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-22 19:15:45 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:57 -0500 |
commit | fc504928677049f0ad3f1fd4e0bb3908172df8f3 (patch) | |
tree | f55fc6a9061b0eac3f0465df412286caf83b3fbd /arch/sparc64/kernel/rtrap.S | |
parent | d7744a09504d5ae84edc8289a02254e1f2102410 (diff) |
[SPARC64]: Drop %gl to 0 before re-enabling PSTATE_IE in rtrap
If we take a window fault, on SUN4V set %gl to zero before we
turn PSTATE_IE back on in %pstate. Otherwise if we take an
interrupt we'll end up with corrupt register state.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 1e724fe172a..7130e866f93 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -333,7 +333,6 @@ user_rtt_fill_fixup: | |||
333 | 333 | ||
334 | mov %g6, %l1 | 334 | mov %g6, %l1 |
335 | wrpr %g0, 0x0, %tl | 335 | wrpr %g0, 0x0, %tl |
336 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
337 | 336 | ||
338 | 661: nop | 337 | 661: nop |
339 | .section .sun4v_1insn_patch, "ax" | 338 | .section .sun4v_1insn_patch, "ax" |
@@ -341,6 +340,8 @@ user_rtt_fill_fixup: | |||
341 | SET_GL(0) | 340 | SET_GL(0) |
342 | .previous | 341 | .previous |
343 | 342 | ||
343 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
344 | |||
344 | mov %l1, %g6 | 345 | mov %l1, %g6 |
345 | ldx [%g6 + TI_TASK], %g4 | 346 | ldx [%g6 + TI_TASK], %g4 |
346 | LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3) | 347 | LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3) |