summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-08-12 09:43:12 +0000
committerkib <kib@FreeBSD.org>2015-08-12 09:43:12 +0000
commitbff0ec5bef3ded3c67c6216c640936ddc7ecc6cc (patch)
tree3ba70608cf6f80a0055a84464c4fdc84661a9d2e /sys/amd64/amd64/mp_machdep.c
parentaa4ad58f86b7a49c39a2491f4738a26a72687ef6 (diff)
downloadFreeBSD-src-bff0ec5bef3ded3c67c6216c640936ddc7ecc6cc.zip
FreeBSD-src-bff0ec5bef3ded3c67c6216c640936ddc7ecc6cc.tar.gz
AP should load aps_ready with acquire semantic to see BSP updates to
the SMP structures, synchronized with the load by release store in release_aps(). The change is formal, x86 strong memory model implicitely provided the guarantees. Discussed with: bde Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 0562ca4..3c0a923 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -282,7 +282,7 @@ init_secondary(void)
mp_naps++;
/* Spin until the BSP releases the AP's. */
- while (!aps_ready)
+ while (atomic_load_acq_int(&aps_ready) == 0)
ia32_pause();
init_secondary_tail();
OpenPOWER on IntegriCloud