aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2002-01-08 05:10:07 +0000
committerJake Burkholder <jake@FreeBSD.org>2002-01-08 05:10:07 +0000
commit79dba4cb34fa899008366ec4f4c40a889d605907 (patch)
treed13e1005abe91806068c4e47fed7270efdf99f44 /sys
parent01cad5de12a337212fae10862a55b9112d0dd90f (diff)
downloadsrc-79dba4cb34fa899008366ec4f4c40a889d605907.tar.gz
src-79dba4cb34fa899008366ec4f4c40a889d605907.zip
Set the normal global pcb register when context switching.
Notes
Notes: svn path=/head/; revision=89043
Diffstat (limited to 'sys')
-rw-r--r--sys/sparc64/sparc64/swtch.S2
-rw-r--r--sys/sparc64/sparc64/swtch.s2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/swtch.S b/sys/sparc64/sparc64/swtch.S
index dc82b641a698..60a8e475dfdf 100644
--- a/sys/sparc64/sparc64/swtch.S
+++ b/sys/sparc64/sparc64/swtch.S
@@ -110,6 +110,8 @@ ENTRY(cpu_switch)
stx %o0, [PCPU(CURTHREAD)]
stx %o1, [PCPU(CURPCB)]
+ wrpr %g0, PSTATE_NORMAL, %pstate
+ mov %o1, PCB_REG
wrpr %g0, PSTATE_ALT, %pstate
mov %o1, PCB_REG
wrpr %g0, PSTATE_KERNEL, %pstate
diff --git a/sys/sparc64/sparc64/swtch.s b/sys/sparc64/sparc64/swtch.s
index dc82b641a698..60a8e475dfdf 100644
--- a/sys/sparc64/sparc64/swtch.s
+++ b/sys/sparc64/sparc64/swtch.s
@@ -110,6 +110,8 @@ ENTRY(cpu_switch)
stx %o0, [PCPU(CURTHREAD)]
stx %o1, [PCPU(CURPCB)]
+ wrpr %g0, PSTATE_NORMAL, %pstate
+ mov %o1, PCB_REG
wrpr %g0, PSTATE_ALT, %pstate
mov %o1, PCB_REG
wrpr %g0, PSTATE_KERNEL, %pstate