diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-10-18 15:36:02 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-18 15:36:02 +0900 |
commit | 1c8db713e21c82e14d0d1be14a09dae224472396 (patch) | |
tree | b8582d42e6f2a0fdcb0fe40ee319c90efc8664a8 /arch/sh/include/asm/atomic.h | |
parent | 15dfdddbf0c2be680d5d2fe2bbe3aad3dba3cf0e (diff) |
sh: Fix up smp_mb__xxx() memory barriers for SH-4A SMP.
In the past these were simply wrapping to barrier() which was sufficient
on SH SMP platforms predating SH-4A. Unfortunately due to ll/sc semantics
an explicit synco is needed in these cases, which is sorted for us by
just switching these over to smp_mb(). smp_mb() also has the benefit of
being wrapped to barrier() in the UP and non-SH4A cases, so old behaviour
is maintained for those parts.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/atomic.h')
-rw-r--r-- | arch/sh/include/asm/atomic.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h index e8e78137c6f..b16388d7195 100644 --- a/arch/sh/include/asm/atomic.h +++ b/arch/sh/include/asm/atomic.h @@ -78,11 +78,10 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) -/* Atomic operations are already serializing on SH */ -#define smp_mb__before_atomic_dec() barrier() -#define smp_mb__after_atomic_dec() barrier() -#define smp_mb__before_atomic_inc() barrier() -#define smp_mb__after_atomic_inc() barrier() +#define smp_mb__before_atomic_dec() smp_mb() +#define smp_mb__after_atomic_dec() smp_mb() +#define smp_mb__before_atomic_inc() smp_mb() +#define smp_mb__after_atomic_inc() smp_mb() #include <asm-generic/atomic-long.h> #include <asm-generic/atomic64.h> |