Commit fc504928677049f0ad3f1fd4e0bb3908172df8f3
1 parent
d7744a0950
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
arch/sparc64/kernel/rtrap.S
... | ... | @@ -333,13 +333,14 @@ |
333 | 333 | |
334 | 334 | mov %g6, %l1 |
335 | 335 | wrpr %g0, 0x0, %tl |
336 | - wrpr %g0, RTRAP_PSTATE, %pstate | |
337 | 336 | |
338 | 337 | 661: nop |
339 | 338 | .section .sun4v_1insn_patch, "ax" |
340 | 339 | .word 661b |
341 | 340 | SET_GL(0) |
342 | 341 | .previous |
342 | + | |
343 | + wrpr %g0, RTRAP_PSTATE, %pstate | |
343 | 344 | |
344 | 345 | mov %l1, %g6 |
345 | 346 | ldx [%g6 + TI_TASK], %g4 |