From owner-svn-src-head@freebsd.org Sun Sep 13 00:08:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13029A02B25; Sun, 13 Sep 2015 00:08:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECB831847; Sun, 13 Sep 2015 00:08:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D08425022375; Sun, 13 Sep 2015 00:08:04 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D084d0022374; Sun, 13 Sep 2015 00:08:04 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201509130008.t8D084d0022374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 13 Sep 2015 00:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287728 - head/sys/sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 00:08:05 -0000 Author: marius Date: Sun Sep 13 00:08:04 2015 New Revision: 287728 URL: https://svnweb.freebsd.org/changeset/base/287728 Log: Merge r286374 from x86: Formally pair store_rel(&smp_started) with load_acq(&smp_started). Similarly to x86, this change is mostly a NOP due to the kernel being run in total store order. MFC after: 1 week Modified: head/sys/sparc64/include/smp.h Modified: head/sys/sparc64/include/smp.h ============================================================================== --- head/sys/sparc64/include/smp.h Sat Sep 12 23:10:34 2015 (r287727) +++ head/sys/sparc64/include/smp.h Sun Sep 13 00:08:04 2015 (r287728) @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -143,7 +144,7 @@ ipi_all_but_self(u_int ipi) { cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return; cpus = all_cpus; sched_pin(); @@ -158,7 +159,8 @@ static __inline void ipi_selected(cpuset_t cpus, u_int ipi) { - if (__predict_false(smp_started == 0 || CPU_EMPTY(&cpus))) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0 || + CPU_EMPTY(&cpus))) return; mtx_lock_spin(&ipi_mtx); cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi); @@ -169,7 +171,7 @@ static __inline void ipi_cpu(int cpu, u_int ipi) { - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return; mtx_lock_spin(&ipi_mtx); cpu_ipi_single(cpu, 0, (u_long)tl_ipi_level, ipi); @@ -183,7 +185,7 @@ ipi_dcache_page_inval(void *func, vm_pad { struct ipi_cache_args *ica; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); ica = &ipi_cache_args; @@ -200,7 +202,7 @@ ipi_icache_page_inval(void *func, vm_pad { struct ipi_cache_args *ica; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); ica = &ipi_cache_args; @@ -217,7 +219,7 @@ ipi_rd(u_int cpu, void *func, u_long *va { struct ipi_rd_args *ira; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); ira = &ipi_rd_args; @@ -234,7 +236,7 @@ ipi_tlb_context_demap(struct pmap *pm) struct ipi_tlb_args *ita; cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); cpus = pm->pm_active; @@ -259,7 +261,7 @@ ipi_tlb_page_demap(struct pmap *pm, vm_o struct ipi_tlb_args *ita; cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); cpus = pm->pm_active; @@ -284,7 +286,7 @@ ipi_tlb_range_demap(struct pmap *pm, vm_ struct ipi_tlb_args *ita; cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); cpus = pm->pm_active;