From bff0ec5bef3ded3c67c6216c640936ddc7ecc6cc Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 12 Aug 2015 09:43:12 +0000 Subject: 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 --- sys/amd64/amd64/mp_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/amd64/amd64/mp_machdep.c') 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(); -- cgit v1.1