]> Pileus Git - ~andy/linux/commitdiff
ARM: 7868/1: arm/arm64: remove atomic_clear_mask() in "include/asm/atomic.h"
authorChen Gang <gang.chen@asianux.com>
Sat, 26 Oct 2013 14:07:41 +0000 (15:07 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 9 Nov 2013 00:00:13 +0000 (00:00 +0000)
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>
arch/arm/include/asm/atomic.h
arch/arm64/include/asm/atomic.h

index 9ee7e01066f99088ed0e1d9943c25479e3d0f8d3..f8a4336ed8fcacd82b86d66a65940d867b5eac92 100644 (file)
@@ -135,21 +135,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
        return oldval;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-       unsigned long tmp, tmp2;
-
-       __asm__ __volatile__("@ atomic_clear_mask\n"
-"1:    ldrex   %0, [%3]\n"
-"      bic     %0, %0, %4\n"
-"      strex   %1, %0, [%3]\n"
-"      teq     %1, #0\n"
-"      bne     1b"
-       : "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
-       : "r" (addr), "Ir" (mask)
-       : "cc");
-}
-
 #else /* ARM_ARCH_6 */
 
 #ifdef CONFIG_SMP
@@ -198,15 +183,6 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
        return ret;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-       unsigned long flags;
-
-       raw_local_irq_save(flags);
-       *addr &= ~mask;
-       raw_local_irq_restore(flags);
-}
-
 #endif /* __LINUX_ARM_ARCH__ */
 
 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
index 8363644685711895cbb049c735b6ebb15cf81ff1..01de5aaa3edc112a42548a1b3906e4353bcce949 100644 (file)
@@ -126,20 +126,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
        return oldval;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-       unsigned long tmp, tmp2;
-
-       asm volatile("// atomic_clear_mask\n"
-"1:    ldxr    %0, %2\n"
-"      bic     %0, %0, %3\n"
-"      stxr    %w1, %0, %2\n"
-"      cbnz    %w1, 1b"
-       : "=&r" (tmp), "=&r" (tmp2), "+Q" (*addr)
-       : "Ir" (mask)
-       : "cc");
-}
-
 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 static inline int __atomic_add_unless(atomic_t *v, int a, int u)