summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-09-16 17:03:52 +0000
committermarcel <marcel@FreeBSD.org>2008-09-16 17:03:52 +0000
commitbe2207880385547d7271b39cb1a88f90e9af385b (patch)
tree04e56839a17fe95930197be7ddc010faabc21cff /sys/powerpc
parent1895a00fef3cc1f309579802691e6b66434deabd (diff)
downloadFreeBSD-src-be2207880385547d7271b39cb1a88f90e9af385b.zip
FreeBSD-src-be2207880385547d7271b39cb1a88f90e9af385b.tar.gz
Set pcpup->pc_curthread and pcpup->pc_curpcb before calling
pmap_activate. While pmap_activate doesn't need either, we do need a valid curthread if we enable KTR_PMAP.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/swtch.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/powerpc/aim/swtch.S b/sys/powerpc/aim/swtch.S
index 0d6875d..0f59e73 100644
--- a/sys/powerpc/aim/swtch.S
+++ b/sys/powerpc/aim/swtch.S
@@ -111,14 +111,14 @@ ENTRY(cpu_switch)
bl pmap_deactivate /* Deactivate the current pmap */
cpu_switchin:
- mr %r3,%r15 /* Get new thread ptr */
- bl pmap_activate /* Activate the new address space */
-
mfsprg %r7,0 /* Get the pcpu pointer */
stw %r15,PC_CURTHREAD(%r7) /* Store new current thread */
lwz %r17,TD_PCB(%r15) /* Store new current PCB */
stw %r17,PC_CURPCB(%r7)
+ mr %r3,%r15 /* Get new thread ptr */
+ bl pmap_activate /* Activate the new address space */
+
lwz %r6, PCB_FLAGS(%r17)
/* Restore FPU context if needed */
andi. %r6, %r6, PCB_FPU
OpenPOWER on IntegriCloud