]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: Strengthen value-returning-atomics memory barriers
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 28 Aug 2011 17:35:59 +0000 (10:35 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 13 Sep 2011 15:46:37 +0000 (08:46 -0700)
The trailing isync/lwsync in PowerPC value-returning atomics needs
to be a sync in order to provide the required ordering properties.
The leading lwsync/eieio can remain, as the remainder of the required
ordering guarantees are provided by the atomic instructions: Any
reordering will cause the stwcx to fail, which will result in a retry.

This commit provides the needed adjustment.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: anton@samba.org
Cc: benh@kernel.crashing.org
Cc: paulus@samba.org
arch/powerpc/include/asm/synch.h

index d7cab44643c51d90f1f79509939e3c734b735eba..4d97fbeee74df9e9c498c879fa471d0e3552791c 100644 (file)
@@ -37,11 +37,7 @@ static inline void isync(void)
 #endif
 
 #ifdef CONFIG_SMP
-#define __PPC_ACQUIRE_BARRIER                          \
-       START_LWSYNC_SECTION(97);                       \
-       isync;                                          \
-       MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup);
-#define PPC_ACQUIRE_BARRIER    "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER)
+#define PPC_ACQUIRE_BARRIER    "\n" stringify_in_c(sync;)
 #define PPC_RELEASE_BARRIER    stringify_in_c(LWSYNC) "\n"
 #else
 #define PPC_ACQUIRE_BARRIER