svn commit: r286374 - head/sys/x86/x86
Konstantin Belousov
kib at FreeBSD.org
Thu Aug 6 18:02:55 UTC 2015
Author: kib
Date: Thu Aug 6 18:02:54 2015
New Revision: 286374
URL: https://svnweb.freebsd.org/changeset/base/286374
Log:
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
Modified:
head/sys/x86/x86/mp_x86.c
Modified: head/sys/x86/x86/mp_x86.c
==============================================================================
--- head/sys/x86/x86/mp_x86.c Thu Aug 6 17:13:34 2015 (r286373)
+++ head/sys/x86/x86/mp_x86.c Thu Aug 6 18:02:54 2015 (r286374)
@@ -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. */
More information about the svn-src-head
mailing list