summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-08-06 18:02:54 +0000
committerkib <kib@FreeBSD.org>2015-08-06 18:02:54 +0000
commitd235284e50a054fcabf9259a761c0dc9d0153b08 (patch)
tree695eddcd6e34a6ea72ca2a70401e6acbc81123fa /sys/x86
parentce28904c93b48681e77faadbe8486fc6b0930f1a (diff)
downloadFreeBSD-src-d235284e50a054fcabf9259a761c0dc9d0153b08.zip
FreeBSD-src-d235284e50a054fcabf9259a761c0dc9d0153b08.tar.gz
Formally pair store_rel(&smp_started) with load_acq(&smp_started).
The expected semantic is to have misc. data, e.g. CPU bitmaps, visible in the BSP after smp_started is written by the last started AP, which formally requires acquire barrier on the load. The change is mostly nop due to the ordered behaviour of the x86 CPUs. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/mp_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
index b4c66a5..c23108c 100644
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -602,7 +602,7 @@ init_secondary_tail(void)
mtx_unlock_spin(&ap_boot_mtx);
/* Wait until all the AP's are up. */
- while (smp_started == 0)
+ while (atomic_load_acq_int(&smp_started) == 0)
ia32_pause();
/* Start per-CPU event timers. */
OpenPOWER on IntegriCloud