From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: julien.grall@linaro.org, tim@xen.org,
Ian Campbell <ian.campbell@citrix.com>,
stefano.stabellini@eu.citrix.com
Subject: [PATCH for-4.5 v2 8/8] xen: arm: use more specific barriers for read and write barriers.
Date: Thu, 13 Feb 2014 12:38:08 +0000 [thread overview]
Message-ID: <1392295088-24219-8-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1392295040.31985.7.camel@kazak.uk.xensource.com>
Note that 32-bit does not provide a load variant of the inner shareable
barrier, so that remains a full any-any barrier.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
---
xen/include/asm-arm/system.h | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h
index 32ed277..7aaaf50 100644
--- a/xen/include/asm-arm/system.h
+++ b/xen/include/asm-arm/system.h
@@ -17,12 +17,21 @@
#define dmb(scope) asm volatile("dmb " #scope : : : "memory")
#define mb() dsb(sy)
-#define rmb() dsb(sy)
-#define wmb() dsb(sy)
+#ifdef CONFIG_ARM_64
+#define rmb() dsb(ld)
+#else
+#define rmb() dsb(sy) /* 32-bit has no ld variant. */
+#endif
+#define wmb() dsb(st)
#define smp_mb() dmb(ish)
-#define smp_rmb() dmb(ish)
-#define smp_wmb() dmb(ish)
+#ifdef CONFIG_ARM_64
+#define smp_rmb() dmb(ishld)
+#else
+#define smp_rmb() dmb(ish) /* 32-bit has no ishld variant. */
+#endif
+
+#define smp_wmb() dmb(ishst)
#define xchg(ptr,x) \
((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
--
1.7.10.4
prev parent reply other threads:[~2014-02-13 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-13 12:37 [PATCH for-4.5 v2 0/8] xen: arm: map normal memory as inner shareable, reduce scope of various barriers Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 1/8] xen: arm: map memory as inner shareable Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 2/8] xen: arm: Only upgrade guest barriers to " Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 3/8] xen: arm: consolidate barrier definitions Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 4/8] xen: arm: Use SMP barriers when that is all which is required Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 5/8] xen: arm: Use dmb for smp barriers Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 6/8] xen: arm: add scope to dsb and dmb macros Ian Campbell
2014-02-13 12:38 ` [PATCH for-4.5 v2 7/8] xen: arm: weaken SMP barriers to inner shareable Ian Campbell
2014-02-13 12:38 ` Ian Campbell [this message]
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=1392295088-24219-8-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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).