[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 10/10] xen: arm: use more specific barriers for read and write barriers.



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@xxxxxxxxxx>
---
 xen/include/asm-arm/system.h |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h
index 7c3e42d..efaf645 100644
--- a/xen/include/asm-arm/system.h
+++ b/xen/include/asm-arm/system.h
@@ -17,12 +17,17 @@
 #define dmb(scope)      asm volatile("dmb " scope : : : "memory")
 
 #define mb()            dsb("sy")
-#define rmb()           dsb("sy")
-#define wmb()           dsb("sy")
+#define rmb()           dsb("ld")
+#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.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.