1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

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
This commit is contained in:
Konstantin Belousov 2015-08-06 18:02:54 +00:00
parent 5ee9ea19fe
commit a8bf83d618
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286374

View File

@ -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. */