summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-10-24 20:53:52 +0000
committerjhb <jhb@FreeBSD.org>2005-10-24 20:53:52 +0000
commitb0356550ccf33cb4d4dac4a3541b70cf4a954071 (patch)
treec5c7117681b323268bf6ca469739c624a3f4e5fa /sys/i386
parent3e00318de1032463a061de977e2d24d2c7f6bbce (diff)
downloadFreeBSD-src-b0356550ccf33cb4d4dac4a3541b70cf4a954071.zip
FreeBSD-src-b0356550ccf33cb4d4dac4a3541b70cf4a954071.tar.gz
When restarting the BSP during cpu_reset() use a membar to ensure that
the updated cpustop_restartfunc is seen when the BSP resumes execution. This matches the membar already present in restart_cpus().
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/vm_machdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 926e44b..ca51b8f 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -551,7 +551,10 @@ cpu_reset()
cpustop_restartfunc = cpu_reset_proxy;
cpu_reset_proxy_active = 0;
printf("cpu_reset: Restarting BSP\n");
- started_cpus = (1<<0); /* Restart CPU #0 */
+
+ /* Restart CPU #0. */
+ /* XXX: restart_cpus(1 << 0); */
+ atomic_store_rel_int(&started_cpus, (1 << 0));
cnt = 0;
while (cpu_reset_proxy_active == 0 && cnt < 10000000)
OpenPOWER on IntegriCloud