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
This commit is contained in:
kib 2015-08-12 09:43:12 +00:00
parent aa4ad58f86
commit bff0ec5bef
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -291,7 +291,7 @@ init_secondary(void)
CHECK_WRITE(0x39, 6);
/* Spin until the BSP releases the AP's. */
while (!aps_ready)
while (atomic_load_acq_int(&aps_ready) == 0)
ia32_pause();
/* BSP may have changed PTD while we were waiting */