aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/tsb.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-16 00:16:42 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:13:08 -0500
commita7b31bac691668a60da8b9892124b7da408e0a0e (patch)
tree2bdf523086234a5cb9e943e45df879f1f264a516 /arch/sparc64/kernel/tsb.S
parentde635d833f61ce0f2ad0b3431e6a3323a1c4fed5 (diff)
[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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/tsb.S')
-rw-r--r--arch/sparc64/kernel/tsb.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index be8f0892d72..7996c9d6670 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -265,13 +265,19 @@ __tsb_context_switch:
265 mov SCRATCHPAD_UTSBREG2, %g1 265 mov SCRATCHPAD_UTSBREG2, %g1
266 stxa %g2, [%g1] ASI_SCRATCHPAD 266 stxa %g2, [%g1] ASI_SCRATCHPAD
267 267
268 /* Save away %o5's %pstate, we have to use %o5 for
269 * the hypervisor call.
270 */
271 mov %o5, %g1
272
268 mov HV_FAST_MMU_TSB_CTXNON0, %o5 273 mov HV_FAST_MMU_TSB_CTXNON0, %o5
269 mov 1, %o0 274 mov 1, %o0
270 mov %o4, %o1 275 mov %o4, %o1
271 ta HV_FAST_TRAP 276 ta HV_FAST_TRAP
272 277
278 /* Finish up and restore %o5. */
273 ba,pt %xcc, 9f 279 ba,pt %xcc, 9f
274 nop 280 mov %g1, %o5
275 281
276 /* SUN4U TSB switch. */ 282 /* SUN4U TSB switch. */
2771: mov TSB_REG, %g1 2831: mov TSB_REG, %g1