diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-03-13 14:00:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-18 08:20:44 -0400 |
commit | 603228bcb8da90f8f8a5cdd8de74178f6c3e7e13 (patch) | |
tree | 2ddad6025a8730a51301df725a18519721230e55 /arch/sh/include | |
parent | 57aa6a76864dfbb5450728199c37c02f401586ec (diff) |
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>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/atomic.h | 6 | ||||
-rw-r--r-- | arch/sh/include/asm/bitops.h | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h index f4c1c20bcdf6..f57b8a6743b3 100644 --- a/arch/sh/include/asm/atomic.h +++ b/arch/sh/include/asm/atomic.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <asm/cmpxchg.h> | 12 | #include <asm/cmpxchg.h> |
13 | #include <asm/barrier.h> | ||
13 | 14 | ||
14 | #define ATOMIC_INIT(i) { (i) } | 15 | #define ATOMIC_INIT(i) { (i) } |
15 | 16 | ||
@@ -62,9 +63,4 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) | |||
62 | return c; | 63 | return c; |
63 | } | 64 | } |
64 | 65 | ||
65 | #define smp_mb__before_atomic_dec() smp_mb() | ||
66 | #define smp_mb__after_atomic_dec() smp_mb() | ||
67 | #define smp_mb__before_atomic_inc() smp_mb() | ||
68 | #define smp_mb__after_atomic_inc() smp_mb() | ||
69 | |||
70 | #endif /* __ASM_SH_ATOMIC_H */ | 66 | #endif /* __ASM_SH_ATOMIC_H */ |
diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h index ea8706d94f08..fc8e652cf173 100644 --- a/arch/sh/include/asm/bitops.h +++ b/arch/sh/include/asm/bitops.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | /* For __swab32 */ | 10 | /* For __swab32 */ |
11 | #include <asm/byteorder.h> | 11 | #include <asm/byteorder.h> |
12 | #include <asm/barrier.h> | ||
12 | 13 | ||
13 | #ifdef CONFIG_GUSA_RB | 14 | #ifdef CONFIG_GUSA_RB |
14 | #include <asm/bitops-grb.h> | 15 | #include <asm/bitops-grb.h> |
@@ -22,12 +23,6 @@ | |||
22 | #include <asm-generic/bitops/non-atomic.h> | 23 | #include <asm-generic/bitops/non-atomic.h> |
23 | #endif | 24 | #endif |
24 | 25 | ||
25 | /* | ||
26 | * clear_bit() doesn't provide any barrier for the compiler. | ||
27 | */ | ||
28 | #define smp_mb__before_clear_bit() smp_mb() | ||
29 | #define smp_mb__after_clear_bit() smp_mb() | ||
30 | |||
31 | #ifdef CONFIG_SUPERH32 | 26 | #ifdef CONFIG_SUPERH32 |
32 | static inline unsigned long ffz(unsigned long word) | 27 | static inline unsigned long ffz(unsigned long word) |
33 | { | 28 | { |