summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-06-23 16:21:43 +0000
committermarcel <marcel@FreeBSD.org>2011-06-23 16:21:43 +0000
commit594e41652df1d0b6c71e43141f9f25d0dfca2a21 (patch)
tree3a0f5a492d795bdba6c2507f33bafc3ed9d611ab /sys/ia64
parent6e30ce7ac2c9a84e443253ce8de8bbd54b0f0361 (diff)
downloadFreeBSD-src-594e41652df1d0b6c71e43141f9f25d0dfca2a21.zip
FreeBSD-src-594e41652df1d0b6c71e43141f9f25d0dfca2a21.tar.gz
Unblock the outgoing thread after we performed pmap_switch() to
switch the region registers. pmap_switch() returns the pmap for which the region register are currently programmed, which needs to be re-programmed on the CPU the ougoing thread gets switched in. This change does not noticibly change anything or fix known bugs, but does give me a warm fuzzy feeling by being more correct.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index f3105fc..185e13c 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -470,12 +470,12 @@ cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx)
if (PCPU_GET(fpcurthread) == old)
old->td_frame->tf_special.psr |= IA64_PSR_DFH;
if (!savectx(oldpcb)) {
- atomic_store_rel_ptr(&old->td_lock, mtx);
-
newpcb = new->td_pcb;
oldpcb->pcb_current_pmap =
pmap_switch(newpcb->pcb_current_pmap);
+ atomic_store_rel_ptr(&old->td_lock, mtx);
+
#if defined(SCHED_ULE) && defined(SMP)
while (atomic_load_acq_ptr(&new->td_lock) == &blocked_lock)
cpu_spinwait();
OpenPOWER on IntegriCloud