提交 a7b31bac 编写于 作者: D David S. Miller

[SPARC64]: Do not write garbage into %pstate in tsb_context_switch().

For SUN4V, we were clobbering %o5 to do the hypervisor call.
This clobbers the saved %pstate value and we end up writing
garbage into that register as a result.  Oops.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 de635d83
...@@ -265,13 +265,19 @@ __tsb_context_switch: ...@@ -265,13 +265,19 @@ __tsb_context_switch:
mov SCRATCHPAD_UTSBREG2, %g1 mov SCRATCHPAD_UTSBREG2, %g1
stxa %g2, [%g1] ASI_SCRATCHPAD stxa %g2, [%g1] ASI_SCRATCHPAD
/* Save away %o5's %pstate, we have to use %o5 for
* the hypervisor call.
*/
mov %o5, %g1
mov HV_FAST_MMU_TSB_CTXNON0, %o5 mov HV_FAST_MMU_TSB_CTXNON0, %o5
mov 1, %o0 mov 1, %o0
mov %o4, %o1 mov %o4, %o1
ta HV_FAST_TRAP ta HV_FAST_TRAP
/* Finish up and restore %o5. */
ba,pt %xcc, 9f ba,pt %xcc, 9f
nop mov %g1, %o5
/* SUN4U TSB switch. */ /* SUN4U TSB switch. */
1: mov TSB_REG, %g1 1: mov TSB_REG, %g1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册