about summary refs log tree commit diff
path: root/arch/powerpc/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/atomic.h')
-rw-r--r--arch/powerpc/atomic.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/atomic.h b/arch/powerpc/atomic.h
index c4ad40cd..a082c09b 100644
--- a/arch/powerpc/atomic.h
+++ b/arch/powerpc/atomic.h
@@ -77,7 +77,11 @@ static inline void a_dec(volatile int *x)
 
 static inline void a_store(volatile int *p, int x)
 {
-	*p=x;
+	__asm__ __volatile__ ("\n"
+		"	sync\n"
+		"	stw %1, %0\n"
+		"	isync\n"
+		: "=m"(*p) : "r"(x) : "memory" );
 }
 
 static inline void a_spin()