Commit b7bb7d9b authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

arch,blackfin: Convert smp_mb__*()

Blackfin's atomic primitives do not imply a full barrier as whitnessed
from its SMP smp_mb__{before,after}_clear_bit() implementations.

However since !SMP smp_mb() reduces to barrier() remove everything and
rely on the asm-generic/barrier.h implentation.
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-1widdkdsb3c1titq8jez6g3g@git.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Steven Miao <realmz6@gmail.com>
Cc: adi-buildroot-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 710adaa9
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#endif /* !CONFIG_SMP */ #endif /* !CONFIG_SMP */
#define smp_mb__before_atomic() barrier()
#define smp_mb__after_atomic() barrier()
#include <asm-generic/barrier.h> #include <asm-generic/barrier.h>
#endif /* _BLACKFIN_BARRIER_H */ #endif /* _BLACKFIN_BARRIER_H */
...@@ -27,21 +27,17 @@ ...@@ -27,21 +27,17 @@
#include <asm-generic/bitops/ext2-atomic.h> #include <asm-generic/bitops/ext2-atomic.h>
#include <asm/barrier.h>
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
#include <linux/irqflags.h> #include <linux/irqflags.h>
/* /*
* clear_bit may not imply a memory barrier * clear_bit may not imply a memory barrier
*/ */
#ifndef smp_mb__before_clear_bit
#define smp_mb__before_clear_bit() smp_mb()
#define smp_mb__after_clear_bit() smp_mb()
#endif
#include <asm-generic/bitops/atomic.h> #include <asm-generic/bitops/atomic.h>
#include <asm-generic/bitops/non-atomic.h> #include <asm-generic/bitops/non-atomic.h>
#else #else
#include <asm/barrier.h>
#include <asm/byteorder.h> /* swab32 */ #include <asm/byteorder.h> /* swab32 */
#include <linux/linkage.h> #include <linux/linkage.h>
...@@ -101,12 +97,6 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) ...@@ -101,12 +97,6 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
return __raw_bit_test_toggle_asm(a, nr & 0x1f); return __raw_bit_test_toggle_asm(a, nr & 0x1f);
} }
/*
* clear_bit() doesn't provide any barrier for the compiler.
*/
#define smp_mb__before_clear_bit() barrier()
#define smp_mb__after_clear_bit() barrier()
#define test_bit __skip_test_bit #define test_bit __skip_test_bit
#include <asm-generic/bitops/non-atomic.h> #include <asm-generic/bitops/non-atomic.h>
#undef test_bit #undef test_bit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment