Date: Thu, 6 Aug 2015 18:02:55 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286374 - head/sys/x86/x86 Message-ID: <201508061802.t76I2tDa055640@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508061802.t76I2tDa055640>