aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2010-08-11 10:51:27 +0000
committerAttilio Rao <attilio@FreeBSD.org>2010-08-11 10:51:27 +0000
commit807ef45666b6efa0f68009d044db82faff4692f5 (patch)
tree0dc25afb56094976f7325aea2ae24d0971fcf420 /sys/amd64
parentee1cd8fe2af40c8250e22d540811e5eff8f53b6b (diff)
Notes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/mp_machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 57daf74b5be1..46ad2899ee3b 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -1324,8 +1324,10 @@ cpustop_handler(void)
cpumask_t cpumask;
u_int cpu;
+ sched_pin();
cpu = PCPU_GET(cpuid);
cpumask = PCPU_GET(cpumask);
+ sched_unpin();
savectx(&stoppcbs[cpu]);
@@ -1356,8 +1358,10 @@ cpususpend_handler(void)
register_t cr3, rf;
u_int cpu;
+ sched_pin();
cpu = PCPU_GET(cpuid);
cpumask = PCPU_GET(cpumask);
+ sched_unpin();
rf = intr_disable();
cr3 = rcr3();
@@ -1535,10 +1539,14 @@ mp_grab_cpu_hlt(void)
#endif
int retval;
- mask = PCPU_GET(cpumask);
#ifdef MP_WATCHDOG
+ sched_pin();
+ mask = PCPU_GET(cpumask);
cpuid = PCPU_GET(cpuid);
+ sched_unpin();
ap_watchdog(cpuid);
+#else
+ mask = PCPU_GET(cpumask);
#endif
retval = mask & hlt_cpus_mask;