Skip to content

Commit

Permalink
arch: Remove __ARCH_HAVE_CMPXCHG
Browse files Browse the repository at this point in the history
We removed the only user of this define in the rtmutex code. Get rid
of it.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
  • Loading branch information
KAGA-KOKO committed May 13, 2015
1 parent cede884 commit a22e5f5
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 31 deletions.
2 changes: 0 additions & 2 deletions arch/alpha/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,4 @@
#undef __ASM__MB
#undef ____cmpxchg

#define __HAVE_ARCH_CMPXCHG 1

#endif /* _ALPHA_CMPXCHG_H */
2 changes: 0 additions & 2 deletions arch/avr32/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ extern unsigned long __cmpxchg_u64_unsupported_on_32bit_kernels(
if something tries to do an invalid cmpxchg(). */
extern void __cmpxchg_called_with_bad_pointer(void);

#define __HAVE_ARCH_CMPXCHG 1

static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
unsigned long new, int size)
{
Expand Down
1 change: 0 additions & 1 deletion arch/hexagon/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
* looks just like atomic_cmpxchg on our arch currently with a bunch of
* variable casting.
*/
#define __HAVE_ARCH_CMPXCHG 1

#define cmpxchg(ptr, old, new) \
({ \
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/include/uapi/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ extern void ia64_xchg_called_with_bad_pointer(void);
* indicated by comparing RETURN with OLD.
*/

#define __HAVE_ARCH_CMPXCHG 1

/*
* This function doesn't exist, so you'll get a linker error
* if something tries to do an invalid cmpxchg().
Expand Down
2 changes: 0 additions & 2 deletions arch/m32r/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ __xchg_local(unsigned long x, volatile void *ptr, int size)
((__typeof__(*(ptr)))__xchg_local((unsigned long)(x), (ptr), \
sizeof(*(ptr))))

#define __HAVE_ARCH_CMPXCHG 1

static inline unsigned long
__cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new)
{
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ extern unsigned long __invalid_cmpxchg_size(volatile void *,
* indicated by comparing RETURN with OLD.
*/
#ifdef CONFIG_RMW_INSNS
#define __HAVE_ARCH_CMPXCHG 1

static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,
unsigned long new, int size)
Expand Down
2 changes: 0 additions & 2 deletions arch/metag/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
return old;
}

#define __HAVE_ARCH_CMPXCHG 1

#define cmpxchg(ptr, o, n) \
({ \
__typeof__(*(ptr)) _o_ = (o); \
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \
})

#define __HAVE_ARCH_CMPXCHG 1

#define __cmpxchg_asm(ld, st, m, old, new) \
({ \
__typeof(*(m)) __ret; \
Expand Down
2 changes: 0 additions & 2 deletions arch/parisc/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ __xchg(unsigned long x, __volatile__ void *ptr, int size)
#define xchg(ptr, x) \
((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))

#define __HAVE_ARCH_CMPXCHG 1

/* bug catcher for when unsupported size is used - won't link */
extern void __cmpxchg_called_with_bad_pointer(void);

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ __xchg_local(volatile void *ptr, unsigned long x, unsigned int size)
* Compare and exchange - if *p == old, set it to new,
* and return the old value of *p.
*/
#define __HAVE_ARCH_CMPXCHG 1

static __always_inline unsigned long
__cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
Expand Down
2 changes: 0 additions & 2 deletions arch/s390/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
__old; \
})

#define __HAVE_ARCH_CMPXCHG

#define __cmpxchg_double_op(p1, p2, o1, o2, n1, n2, insn) \
({ \
register __typeof__(*(p1)) __old1 asm("2") = (o1); \
Expand Down
2 changes: 0 additions & 2 deletions arch/score/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ static inline unsigned long __cmpxchg(volatile unsigned long *m,
(unsigned long)(o), \
(unsigned long)(n)))

#define __HAVE_ARCH_CMPXCHG 1

#include <asm-generic/cmpxchg-local.h>

#endif /* _ASM_SCORE_CMPXCHG_H */
2 changes: 0 additions & 2 deletions arch/sh/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ extern void __xchg_called_with_bad_pointer(void);
* if something tries to do an invalid cmpxchg(). */
extern void __cmpxchg_called_with_bad_pointer(void);

#define __HAVE_ARCH_CMPXCHG 1

static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
unsigned long new, int size)
{
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/include/asm/cmpxchg_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int
*
* Cribbed from <asm-parisc/atomic.h>
*/
#define __HAVE_ARCH_CMPXCHG 1

/* bug catcher for when unsupported size is used - won't link */
void __cmpxchg_called_with_bad_pointer(void);
Expand Down
2 changes: 0 additions & 2 deletions arch/sparc/include/asm/cmpxchg_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr,

#include <asm-generic/cmpxchg-local.h>

#define __HAVE_ARCH_CMPXCHG 1

static inline unsigned long
__cmpxchg_u32(volatile int *m, int old, int new)
{
Expand Down
3 changes: 0 additions & 3 deletions arch/tile/include/asm/atomic_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ static inline long atomic64_add_unless(atomic64_t *v, long a, long u)

#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)

/* Define this to indicate that cmpxchg is an efficient operation. */
#define __HAVE_ARCH_CMPXCHG

#endif /* !__ASSEMBLY__ */

#endif /* _ASM_TILE_ATOMIC_64_H */
2 changes: 0 additions & 2 deletions arch/x86/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include <linux/compiler.h>
#include <asm/alternative.h> /* Provides LOCK_PREFIX */

#define __HAVE_ARCH_CMPXCHG 1

/*
* Non-existant functions to indicate usage errors at link time
* (or compile-time if the compiler implements __compiletime_error().
Expand Down

0 comments on commit a22e5f5

Please sign in to comment.