Skip to content

Commit

Permalink
arch,sh: Convert smp_mb__*()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 18, 2014
1 parent 57aa6a7 commit 603228b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions arch/sh/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/cmpxchg.h>
#include <asm/barrier.h>

#define ATOMIC_INIT(i) { (i) }

Expand Down Expand Up @@ -62,9 +63,4 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
return c;
}

#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()

#endif /* __ASM_SH_ATOMIC_H */
7 changes: 1 addition & 6 deletions arch/sh/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/* For __swab32 */
#include <asm/byteorder.h>
#include <asm/barrier.h>

#ifdef CONFIG_GUSA_RB
#include <asm/bitops-grb.h>
Expand All @@ -22,12 +23,6 @@
#include <asm-generic/bitops/non-atomic.h>
#endif

/*
* clear_bit() doesn't provide any barrier for the compiler.
*/
#define smp_mb__before_clear_bit() smp_mb()
#define smp_mb__after_clear_bit() smp_mb()

#ifdef CONFIG_SUPERH32
static inline unsigned long ffz(unsigned long word)
{
Expand Down

0 comments on commit 603228b

Please sign in to comment.