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:
parent
aa4ad58f86
commit
bff0ec5bef
@ -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();
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user