Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch,sh: Convert smp_mb__*()

SH can use the asm-generic/barrier.h implementation since that uses
smp_mb().

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-2z962by2ppzcd984ybw2mwdw@git.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Peter Zijlstra and committed by
Ingo Molnar
603228bc 57aa6a76

+2 -11
+1 -5
arch/sh/include/asm/atomic.h
··· 10 10 #include <linux/compiler.h> 11 11 #include <linux/types.h> 12 12 #include <asm/cmpxchg.h> 13 + #include <asm/barrier.h> 13 14 14 15 #define ATOMIC_INIT(i) { (i) } 15 16 ··· 62 61 63 62 return c; 64 63 } 65 - 66 - #define smp_mb__before_atomic_dec() smp_mb() 67 - #define smp_mb__after_atomic_dec() smp_mb() 68 - #define smp_mb__before_atomic_inc() smp_mb() 69 - #define smp_mb__after_atomic_inc() smp_mb() 70 64 71 65 #endif /* __ASM_SH_ATOMIC_H */
+1 -6
arch/sh/include/asm/bitops.h
··· 9 9 10 10 /* For __swab32 */ 11 11 #include <asm/byteorder.h> 12 + #include <asm/barrier.h> 12 13 13 14 #ifdef CONFIG_GUSA_RB 14 15 #include <asm/bitops-grb.h> ··· 22 21 #include <asm-generic/bitops/atomic.h> 23 22 #include <asm-generic/bitops/non-atomic.h> 24 23 #endif 25 - 26 - /* 27 - * clear_bit() doesn't provide any barrier for the compiler. 28 - */ 29 - #define smp_mb__before_clear_bit() smp_mb() 30 - #define smp_mb__after_clear_bit() smp_mb() 31 24 32 25 #ifdef CONFIG_SUPERH32 33 26 static inline unsigned long ffz(unsigned long word)