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().
This commit is contained in:
John Baldwin 2005-10-24 20:53:52 +00:00
parent 95d84e5461
commit 301268b8ca
2 changed files with 7 additions and 2 deletions

View File

@ -389,7 +389,9 @@ 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. */
atomic_store_rel_int(&started_cpus, 1 << 0);
cnt = 0;
while (cpu_reset_proxy_active == 0 && cnt < 10000000)

View File

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