linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/5] arm64: barriers: use barrier() instead of smp_mb() when !SMP
Date: Mon, 10 Feb 2014 14:22:39 +0000	[thread overview]
Message-ID: <1392042159-11603-5-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1392042159-11603-1-git-send-email-will.deacon@arm.com>

The recently introduced acquire/release accessors refer to smp_mb()
in the !CONFIG_SMP case. This is confusing when reading the code, so use
barrier() directly when we know we're UP.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm64/include/asm/barrier.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h
index 71a42d6599fb..709f1f6d6bbd 100644
--- a/arch/arm64/include/asm/barrier.h
+++ b/arch/arm64/include/asm/barrier.h
@@ -40,7 +40,7 @@
 #define smp_store_release(p, v)						\
 do {									\
 	compiletime_assert_atomic_type(*p);				\
-	smp_mb();							\
+	barrier();							\
 	ACCESS_ONCE(*p) = (v);						\
 } while (0)
 
@@ -48,7 +48,7 @@ do {									\
 ({									\
 	typeof(*p) ___p1 = ACCESS_ONCE(*p);				\
 	compiletime_assert_atomic_type(*p);				\
-	smp_mb();							\
+	barrier();							\
 	___p1;								\
 })
 
-- 
1.8.2.2

  parent reply	other threads:[~2014-02-10 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 14:22 [PATCH v2 1/5] arm64: barriers: make use of barrier options with explicit barriers Will Deacon
2014-02-10 14:22 ` [PATCH v2 2/5] irqchip: gic: use writel instead of dsb + writel_relaxed Will Deacon
2014-02-10 16:17   ` Catalin Marinas
2014-02-11  8:52   ` Marc Zyngier
2014-02-10 14:22 ` [PATCH v2 3/5] iommu/arm-smmu: provide option to dsb macro when publishing tables Will Deacon
2014-02-10 14:22 ` [PATCH v2 4/5] arm64: barriers: wire up new barrier options Will Deacon
2014-02-10 14:22 ` Will Deacon [this message]
2014-02-10 16:18 ` [PATCH v2 1/5] arm64: barriers: make use of barrier options with explicit barriers Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392042159-11603-5-git-send-email-will.deacon@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).