aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/atomic_32.h7
-rw-r--r--arch/sparc/include/asm/atomic_64.h7
-rw-r--r--arch/sparc/include/asm/barrier_64.h3
-rw-r--r--arch/sparc/include/asm/bitops_32.h3
-rw-r--r--arch/sparc/include/asm/bitops_64.h4
5 files changed, 6 insertions, 18 deletions
diff --git a/arch/sparc/include/asm/atomic_32.h b/arch/sparc/include/asm/atomic_32.h
index 905832aa9e9e..f08fe51b264d 100644
--- a/arch/sparc/include/asm/atomic_32.h
+++ b/arch/sparc/include/asm/atomic_32.h
@@ -14,6 +14,7 @@
14#include <linux/types.h> 14#include <linux/types.h>
15 15
16#include <asm/cmpxchg.h> 16#include <asm/cmpxchg.h>
17#include <asm/barrier.h>
17#include <asm-generic/atomic64.h> 18#include <asm-generic/atomic64.h>
18 19
19 20
@@ -52,10 +53,4 @@ extern void atomic_set(atomic_t *, int);
52#define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) 53#define atomic_dec_and_test(v) (atomic_dec_return(v) == 0)
53#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) 54#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
54 55
55/* Atomic operations are already serializing */
56#define smp_mb__before_atomic_dec() barrier()
57#define smp_mb__after_atomic_dec() barrier()
58#define smp_mb__before_atomic_inc() barrier()
59#define smp_mb__after_atomic_inc() barrier()
60
61#endif /* !(__ARCH_SPARC_ATOMIC__) */ 56#endif /* !(__ARCH_SPARC_ATOMIC__) */
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h
index be56a244c9cf..8b2f1bde2889 100644
--- a/arch/sparc/include/asm/atomic_64.h
+++ b/arch/sparc/include/asm/atomic_64.h
@@ -9,6 +9,7 @@
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <asm/cmpxchg.h> 11#include <asm/cmpxchg.h>
12#include <asm/barrier.h>
12 13
13#define ATOMIC_INIT(i) { (i) } 14#define ATOMIC_INIT(i) { (i) }
14#define ATOMIC64_INIT(i) { (i) } 15#define ATOMIC64_INIT(i) { (i) }
@@ -108,10 +109,4 @@ static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
108 109
109extern long atomic64_dec_if_positive(atomic64_t *v); 110extern long atomic64_dec_if_positive(atomic64_t *v);
110 111
111/* Atomic operations are already serializing */
112#define smp_mb__before_atomic_dec() barrier()
113#define smp_mb__after_atomic_dec() barrier()
114#define smp_mb__before_atomic_inc() barrier()
115#define smp_mb__after_atomic_inc() barrier()
116
117#endif /* !(__ARCH_SPARC64_ATOMIC__) */ 112#endif /* !(__ARCH_SPARC64_ATOMIC__) */
diff --git a/arch/sparc/include/asm/barrier_64.h b/arch/sparc/include/asm/barrier_64.h
index b5aad964558e..305dcc3dc721 100644
--- a/arch/sparc/include/asm/barrier_64.h
+++ b/arch/sparc/include/asm/barrier_64.h
@@ -68,4 +68,7 @@ do { \
68 ___p1; \ 68 ___p1; \
69}) 69})
70 70
71#define smp_mb__before_atomic() barrier()
72#define smp_mb__after_atomic() barrier()
73
71#endif /* !(__SPARC64_BARRIER_H) */ 74#endif /* !(__SPARC64_BARRIER_H) */
diff --git a/arch/sparc/include/asm/bitops_32.h b/arch/sparc/include/asm/bitops_32.h
index 25a676653d45..88c9a962502c 100644
--- a/arch/sparc/include/asm/bitops_32.h
+++ b/arch/sparc/include/asm/bitops_32.h
@@ -90,9 +90,6 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
90 90
91#include <asm-generic/bitops/non-atomic.h> 91#include <asm-generic/bitops/non-atomic.h>
92 92
93#define smp_mb__before_clear_bit() do { } while(0)
94#define smp_mb__after_clear_bit() do { } while(0)
95
96#include <asm-generic/bitops/ffz.h> 93#include <asm-generic/bitops/ffz.h>
97#include <asm-generic/bitops/__ffs.h> 94#include <asm-generic/bitops/__ffs.h>
98#include <asm-generic/bitops/sched.h> 95#include <asm-generic/bitops/sched.h>
diff --git a/arch/sparc/include/asm/bitops_64.h b/arch/sparc/include/asm/bitops_64.h
index 29011cc0e4be..f1a051ca301a 100644
--- a/arch/sparc/include/asm/bitops_64.h
+++ b/arch/sparc/include/asm/bitops_64.h
@@ -13,6 +13,7 @@
13 13
14#include <linux/compiler.h> 14#include <linux/compiler.h>
15#include <asm/byteorder.h> 15#include <asm/byteorder.h>
16#include <asm/barrier.h>
16 17
17extern int test_and_set_bit(unsigned long nr, volatile unsigned long *addr); 18extern int test_and_set_bit(unsigned long nr, volatile unsigned long *addr);
18extern int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr); 19extern int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr);
@@ -23,9 +24,6 @@ extern void change_bit(unsigned long nr, volatile unsigned long *addr);
23 24
24#include <asm-generic/bitops/non-atomic.h> 25#include <asm-generic/bitops/non-atomic.h>
25 26
26#define smp_mb__before_clear_bit() barrier()
27#define smp_mb__after_clear_bit() barrier()
28
29#include <asm-generic/bitops/fls.h> 27#include <asm-generic/bitops/fls.h>
30#include <asm-generic/bitops/__fls.h> 28#include <asm-generic/bitops/__fls.h>
31#include <asm-generic/bitops/fls64.h> 29#include <asm-generic/bitops/fls64.h>