aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-10-26 10:07:41 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-11-08 19:00:13 -0500
commitaed3a4ed7222ae37860ae33cbad3ea7a6b2eaf8e (patch)
tree08b89fd6f357407bf61b106b08e68d637bf59fea
parent4dcc1cf7316a26e112f5c9fcca531ff98ef44700 (diff)
ARM: 7868/1: arm/arm64: remove atomic_clear_mask() in "include/asm/atomic.h"
In current kernel wide source code, except other architectures, only s390 scsi drivers use atomic_clear_mask(), and arm/arm64 need not support s390 drivers. So remove atomic_clear_mask() from "arm[64]/include/asm/atomic.h". Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/include/asm/atomic.h24
-rw-r--r--arch/arm64/include/asm/atomic.h14
2 files changed, 0 insertions, 38 deletions
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 9ee7e01066f9..f8a4336ed8fc 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -135,21 +135,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
135 return oldval; 135 return oldval;
136} 136}
137 137
138static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
139{
140 unsigned long tmp, tmp2;
141
142 __asm__ __volatile__("@ atomic_clear_mask\n"
143"1: ldrex %0, [%3]\n"
144" bic %0, %0, %4\n"
145" strex %1, %0, [%3]\n"
146" teq %1, #0\n"
147" bne 1b"
148 : "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
149 : "r" (addr), "Ir" (mask)
150 : "cc");
151}
152
153#else /* ARM_ARCH_6 */ 138#else /* ARM_ARCH_6 */
154 139
155#ifdef CONFIG_SMP 140#ifdef CONFIG_SMP
@@ -198,15 +183,6 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
198 return ret; 183 return ret;
199} 184}
200 185
201static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
202{
203 unsigned long flags;
204
205 raw_local_irq_save(flags);
206 *addr &= ~mask;
207 raw_local_irq_restore(flags);
208}
209
210#endif /* __LINUX_ARM_ARCH__ */ 186#endif /* __LINUX_ARM_ARCH__ */
211 187
212#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 188#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
diff --git a/arch/arm64/include/asm/atomic.h b/arch/arm64/include/asm/atomic.h
index 836364468571..01de5aaa3edc 100644
--- a/arch/arm64/include/asm/atomic.h
+++ b/arch/arm64/include/asm/atomic.h
@@ -126,20 +126,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
126 return oldval; 126 return oldval;
127} 127}
128 128
129static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
130{
131 unsigned long tmp, tmp2;
132
133 asm volatile("// atomic_clear_mask\n"
134"1: ldxr %0, %2\n"
135" bic %0, %0, %3\n"
136" stxr %w1, %0, %2\n"
137" cbnz %w1, 1b"
138 : "=&r" (tmp), "=&r" (tmp2), "+Q" (*addr)
139 : "Ir" (mask)
140 : "cc");
141}
142
143#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 129#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
144 130
145static inline int __atomic_add_unless(atomic_t *v, int a, int u) 131static inline int __atomic_add_unless(atomic_t *v, int a, int u)