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:38 -0400 |
commit | 40074dece684fc61ab72cfc1689d564cba1c5f64 (patch) | |
tree | eb37370f63886527763387fb675f556e399cf107 /arch/metag | |
parent | 2db56e8606016e33903c64feaed989ffecd66a1b (diff) |
arch,metag: Convert smp_mb__*()
Implement the new barriers; as per the old versions the metag atomic
imply a full barrier.
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-dqnyo215kq38wi4xcxnbpjw3@git.kernel.org
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/metag')
-rw-r--r-- | arch/metag/include/asm/atomic.h | 6 | ||||
-rw-r--r-- | arch/metag/include/asm/barrier.h | 3 | ||||
-rw-r--r-- | arch/metag/include/asm/bitops.h | 6 |
3 files changed, 4 insertions, 11 deletions
diff --git a/arch/metag/include/asm/atomic.h b/arch/metag/include/asm/atomic.h index 307ecd2bd9a1..470e365f04ea 100644 --- a/arch/metag/include/asm/atomic.h +++ b/arch/metag/include/asm/atomic.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <asm/cmpxchg.h> | 6 | #include <asm/cmpxchg.h> |
7 | #include <asm/barrier.h> | ||
7 | 8 | ||
8 | #if defined(CONFIG_METAG_ATOMICITY_IRQSOFF) | 9 | #if defined(CONFIG_METAG_ATOMICITY_IRQSOFF) |
9 | /* The simple UP case. */ | 10 | /* The simple UP case. */ |
@@ -39,11 +40,6 @@ | |||
39 | 40 | ||
40 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 41 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
41 | 42 | ||
42 | #define smp_mb__before_atomic_dec() barrier() | ||
43 | #define smp_mb__after_atomic_dec() barrier() | ||
44 | #define smp_mb__before_atomic_inc() barrier() | ||
45 | #define smp_mb__after_atomic_inc() barrier() | ||
46 | |||
47 | #endif | 43 | #endif |
48 | 44 | ||
49 | #define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v) | 45 | #define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v) |
diff --git a/arch/metag/include/asm/barrier.h b/arch/metag/include/asm/barrier.h index 5d6b4b407dda..d1768c6f5b18 100644 --- a/arch/metag/include/asm/barrier.h +++ b/arch/metag/include/asm/barrier.h | |||
@@ -97,4 +97,7 @@ do { \ | |||
97 | ___p1; \ | 97 | ___p1; \ |
98 | }) | 98 | }) |
99 | 99 | ||
100 | #define smp_mb__before_atomic() barrier() | ||
101 | #define smp_mb__after_atomic() barrier() | ||
102 | |||
100 | #endif /* _ASM_METAG_BARRIER_H */ | 103 | #endif /* _ASM_METAG_BARRIER_H */ |
diff --git a/arch/metag/include/asm/bitops.h b/arch/metag/include/asm/bitops.h index c0d0df0d1378..2671134ee745 100644 --- a/arch/metag/include/asm/bitops.h +++ b/arch/metag/include/asm/bitops.h | |||
@@ -5,12 +5,6 @@ | |||
5 | #include <asm/barrier.h> | 5 | #include <asm/barrier.h> |
6 | #include <asm/global_lock.h> | 6 | #include <asm/global_lock.h> |
7 | 7 | ||
8 | /* | ||
9 | * clear_bit() doesn't provide any barrier for the compiler. | ||
10 | */ | ||
11 | #define smp_mb__before_clear_bit() barrier() | ||
12 | #define smp_mb__after_clear_bit() barrier() | ||
13 | |||
14 | #ifdef CONFIG_SMP | 8 | #ifdef CONFIG_SMP |
15 | /* | 9 | /* |
16 | * These functions are the basis of our bit ops. | 10 | * These functions are the basis of our bit ops. |