[PATCH 5/5] remove HAVE_ARCH_CMPXCHG

From: Nick Piggin (nickpiggin_at_yahoo.com.au)
Date: 09/14/05

  • Next message: Alexey Dobriyan: "[PATCH] arch/i386/pci/acpi.c: use for_each_pci_dev"
    Date:	Thu, 15 Sep 2005 01:01:58 +1000
    To: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>
    
    
    

    Is there any point in keeping this around?

    -- 
    SUSE Labs, Novell Inc.
    
    

    Index: linux-2.6/include/asm-alpha/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-alpha/system.h
    +++ linux-2.6/include/asm-alpha/system.h
    @@ -477,8 +477,6 @@ extern void __xchg_called_with_bad_point
      * we don't need any memory barrier as far I can tell.
      */
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     static inline unsigned long
     __cmpxchg_u8(volatile char *m, long old, long new)
     {
    Index: linux-2.6/include/asm-i386/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-i386/system.h
    +++ linux-2.6/include/asm-i386/system.h
    @@ -257,10 +257,6 @@ static inline unsigned long __xchg(unsig
      * indicated by comparing RETURN with OLD.
      */
     
    -#ifdef CONFIG_X86_CMPXCHG
    -#define __HAVE_ARCH_CMPXCHG 1
    -#endif
    -
     static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
                                           unsigned long new, int size)
     {
    Index: linux-2.6/include/asm-m68k/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-m68k/system.h
    +++ linux-2.6/include/asm-m68k/system.h
    @@ -164,7 +164,6 @@ static inline unsigned long __xchg(unsig
      * 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)
    Index: linux-2.6/include/asm-m68knommu/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-m68knommu/system.h
    +++ linux-2.6/include/asm-m68knommu/system.h
    @@ -195,7 +195,6 @@ static inline unsigned long __xchg(unsig
      * store NEW in MEM. Return the initial value in MEM. Success is
      * indicated by comparing RETURN with OLD.
      */
    -#define __HAVE_ARCH_CMPXCHG 1
     
     static __inline__ unsigned long
     cmpxchg(volatile int *p, int old, int new)
    Index: linux-2.6/include/asm-mips/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-mips/system.h
    +++ linux-2.6/include/asm-mips/system.h
    @@ -277,8 +277,6 @@ static inline unsigned long __xchg(unsig
     #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
     #define tas(ptr) (xchg((ptr),1))
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
             unsigned long new)
     {
    Index: linux-2.6/include/asm-ppc/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-ppc/system.h
    +++ linux-2.6/include/asm-ppc/system.h
    @@ -155,8 +155,6 @@ extern inline void * xchg_ptr(void * m,
     }
     
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     static __inline__ unsigned long
     __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new)
     {
    Index: linux-2.6/include/asm-ppc64/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-ppc64/system.h
    +++ linux-2.6/include/asm-ppc64/system.h
    @@ -223,8 +223,6 @@ __xchg(volatile void *ptr, unsigned long
     
     #define tas(ptr) (xchg((ptr),1))
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     static __inline__ unsigned long
     __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
     {
    Index: linux-2.6/include/asm-s390/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-s390/system.h
    +++ linux-2.6/include/asm-s390/system.h
    @@ -189,8 +189,6 @@ static inline unsigned long __xchg(unsig
      * indicated by comparing RETURN with OLD.
      */
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     #define cmpxchg(ptr,o,n)\
             ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
                                             (unsigned long)(n),sizeof(*(ptr))))
    Index: linux-2.6/include/asm-sparc64/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-sparc64/system.h
    +++ linux-2.6/include/asm-sparc64/system.h
    @@ -321,8 +321,6 @@ extern void die_if_kernel(char *str, str
      * indicated by comparing RETURN with OLD.
      */
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     static __inline__ unsigned long
     __cmpxchg_u32(volatile int *m, int old, int new)
     {
    Index: linux-2.6/include/asm-x86_64/system.h
    ===================================================================
    --- linux-2.6.orig/include/asm-x86_64/system.h
    +++ linux-2.6/include/asm-x86_64/system.h
    @@ -237,8 +237,6 @@ static inline unsigned long __xchg(unsig
      * indicated by comparing RETURN with OLD.
      */
     
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
                                           unsigned long new, int size)
     {
    Index: linux-2.6/arch/i386/kernel/acpi/boot.c
    ===================================================================
    --- linux-2.6.orig/arch/i386/kernel/acpi/boot.c
    +++ linux-2.6/arch/i386/kernel/acpi/boot.c
    @@ -83,7 +83,7 @@ int acpi_skip_timer_override __initdata;
     static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
     #endif
     
    -#ifndef __HAVE_ARCH_CMPXCHG
    +#ifndef CONFIG_X86_CMPXCHG
     #warning ACPI uses CMPXCHG, i486 and later hardware
     #endif
     
    Index: linux-2.6/include/asm-i386/mc146818rtc.h
    ===================================================================
    --- linux-2.6.orig/include/asm-i386/mc146818rtc.h
    +++ linux-2.6/include/asm-i386/mc146818rtc.h
    @@ -13,7 +13,7 @@
     #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
     #endif
     
    -#ifdef __HAVE_ARCH_CMPXCHG
    +#ifdef CONFIG_X86_CMPXCHG
     /*
      * This lock provides nmi access to the CMOS/RTC registers. It has some
      * special properties. It is owned by a CPU and stores the index register
    Index: linux-2.6/include/asm-ia64/intrinsics.h
    ===================================================================
    --- linux-2.6.orig/include/asm-ia64/intrinsics.h
    +++ linux-2.6/include/asm-ia64/intrinsics.h
    @@ -111,8 +111,6 @@ extern void ia64_xchg_called_with_bad_po
      * 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().
    Index: linux-2.6/include/asm-parisc/atomic.h
    ===================================================================
    --- linux-2.6.orig/include/asm-parisc/atomic.h
    +++ linux-2.6/include/asm-parisc/atomic.h
    @@ -98,8 +98,6 @@ static __inline__ unsigned long __xchg(u
             ((__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);
     
    Index: linux-2.6/include/asm-um/system-i386.h
    ===================================================================
    --- linux-2.6.orig/include/asm-um/system-i386.h
    +++ linux-2.6/include/asm-um/system-i386.h
    @@ -3,6 +3,4 @@
     
     #include "asm/system-generic.h"
         
    -#define __HAVE_ARCH_CMPXCHG 1
    -
     #endif

    Send instant messages to your online friends http://au.messenger.yahoo.com
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Alexey Dobriyan: "[PATCH] arch/i386/pci/acpi.c: use for_each_pci_dev"

    Relevant Pages


    Loading