diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-03-13 14:00:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-18 08:20:35 -0400 |
commit | 94cf42f823bc904305b0ee93a09bcd51ba380497 (patch) | |
tree | b86c3e51c916f72724a0b9c5e09e87b4729ea287 /arch/hexagon | |
parent | d038c0e8380fa8cae049bee8d81a5672cd159013 (diff) |
arch,hexagon: Convert smp_mb__*()
Hexagon uses asm-gemeric/barrier.h and its smp_mb() is barrier().
Therefore we can use the default implementation 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-87irqrrbgizeojjfdqhypud3@git.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-hexagon@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/hexagon')
-rw-r--r-- | arch/hexagon/include/asm/atomic.h | 6 | ||||
-rw-r--r-- | arch/hexagon/include/asm/bitops.h | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h index 17dc63780c06..de916b11bff5 100644 --- a/arch/hexagon/include/asm/atomic.h +++ b/arch/hexagon/include/asm/atomic.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <asm/cmpxchg.h> | 26 | #include <asm/cmpxchg.h> |
27 | #include <asm/barrier.h> | ||
27 | 28 | ||
28 | #define ATOMIC_INIT(i) { (i) } | 29 | #define ATOMIC_INIT(i) { (i) } |
29 | 30 | ||
@@ -176,9 +177,4 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u) | |||
176 | #define atomic_inc_return(v) (atomic_add_return(1, v)) | 177 | #define atomic_inc_return(v) (atomic_add_return(1, v)) |
177 | #define atomic_dec_return(v) (atomic_sub_return(1, v)) | 178 | #define atomic_dec_return(v) (atomic_sub_return(1, v)) |
178 | 179 | ||
179 | #define smp_mb__before_atomic_dec() barrier() | ||
180 | #define smp_mb__after_atomic_dec() barrier() | ||
181 | #define smp_mb__before_atomic_inc() barrier() | ||
182 | #define smp_mb__after_atomic_inc() barrier() | ||
183 | |||
184 | #endif | 180 | #endif |
diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h index 9b1e4afbab3c..5e4a59b3ec1b 100644 --- a/arch/hexagon/include/asm/bitops.h +++ b/arch/hexagon/include/asm/bitops.h | |||
@@ -25,12 +25,10 @@ | |||
25 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
26 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
27 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
28 | #include <asm/barrier.h> | ||
28 | 29 | ||
29 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
30 | 31 | ||
31 | #define smp_mb__before_clear_bit() barrier() | ||
32 | #define smp_mb__after_clear_bit() barrier() | ||
33 | |||
34 | /* | 32 | /* |
35 | * The offset calculations for these are based on BITS_PER_LONG == 32 | 33 | * The offset calculations for these are based on BITS_PER_LONG == 32 |
36 | * (i.e. I get to shift by #5-2 (32 bits per long, 4 bytes per access), | 34 | * (i.e. I get to shift by #5-2 (32 bits per long, 4 bytes per access), |