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.
This commit is contained in:
Marcel Moolenaar 2008-09-16 17:03:52 +00:00
parent 24f2c3f394
commit 5e3943bf93
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183088

View File

@ -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