[CRIU] [PATCH 2/4] arm: added the ARMv6 data barrier implementation

Alexander Kartashov alekskartashov at parallels.com
Wed Jul 10 02:15:55 EDT 2013


Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>

---
 arch/arm/include/asm/atomic.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index ccf6a7d..7468790 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -8,8 +8,17 @@ typedef struct {
 
 /* Copied from the Linux kernel header arch/arm/include/asm/atomic.h */
 
+#if defined(CONFIG_ARMV7)
+
 #define smp_mb() __asm__ __volatile__ ("dmb" : : : "memory")
 
+#elif defined(CONFIG_ARMV6)
+
+#define smp_mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5"	: : "r" (0) : "memory")
+
+#endif
+
+
 #define atomic_set(mem,v) ((mem)->counter = (v))
 #define atomic_get(v)	(*(volatile u32 *)&(v)->counter)
 
-- 
1.7.10.4



More information about the CRIU mailing list