Skip to content

Commit

Permalink
[SPARC64]: Drop %gl to 0 before re-enabling PSTATE_IE in rtrap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Mar 20, 2006
1 parent d7744a0 commit fc50492
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/sparc64/kernel/rtrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,15 @@ user_rtt_fill_fixup:

mov %g6, %l1
wrpr %g0, 0x0, %tl
wrpr %g0, RTRAP_PSTATE, %pstate

661: nop
.section .sun4v_1insn_patch, "ax"
.word 661b
SET_GL(0)
.previous

wrpr %g0, RTRAP_PSTATE, %pstate

mov %l1, %g6
ldx [%g6 + TI_TASK], %g4
LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)
Expand Down

0 comments on commit fc50492

Please sign in to comment.