All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Linux Kernel Mailing List <Linux-Kernel@vger.kernel.org>
Cc: Dipankar Sarma <dipankar@in.ibm.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 5/5] remove HAVE_ARCH_CMPXCHG
Date: Thu, 15 Sep 2005 01:01:58 +1000	[thread overview]
Message-ID: <43283B66.8080005@yahoo.com.au> (raw)
In-Reply-To: <432839F1.5020907@yahoo.com.au>

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

Is there any point in keeping this around?

-- 
SUSE Labs, Novell Inc.


[-- Attachment #2: remove-HAVE_ARCH_CMPXCHG.patch --]
[-- Type: text/plain, Size: 6897 bytes --]

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

  reply	other threads:[~2005-09-14 15:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 14:48 [PATCH 1/5] atomic: introduce atomic_cmpxchg Nick Piggin
2005-09-14 14:49 ` [PATCH 2/5] atomic: introduce atomic_inc_not_zero Nick Piggin
2005-09-14 14:51   ` [PATCH 3/5] rcu file: use atomic primitives Nick Piggin
2005-09-14 14:55     ` [PATCH 4/5] atomic: dec_and_lock use cmpxchg Nick Piggin
2005-09-14 15:01       ` Nick Piggin [this message]
2005-09-14 16:31         ` [PATCH 5/5] remove HAVE_ARCH_CMPXCHG Roman Zippel
2005-09-14 16:49           ` Nick Piggin
2005-09-14 17:59             ` David S. Miller
2005-09-14 22:03             ` Russell King
2005-09-14 22:26               ` David S. Miller
2005-09-15  7:10                 ` Russell King
2005-09-15 13:08         ` Alan Cox
2005-09-14 15:20       ` [PATCH 4/5] atomic: dec_and_lock use cmpxchg Nick Piggin
2005-09-14 16:24       ` David S. Miller
2005-09-14 16:52         ` Nick Piggin
2005-09-17  0:05           ` David S. Miller
2005-09-14 16:16   ` [PATCH 2/5] atomic: introduce atomic_inc_not_zero Roman Zippel
2005-09-14 16:44     ` Nick Piggin
2005-09-14 17:04       ` Nick Piggin
2005-09-14 17:18       ` Roman Zippel
2005-09-14 22:00         ` Russell King
2005-09-14 22:10           ` Roman Zippel
2005-09-14 22:21             ` Russell King
2005-09-15  1:51               ` Nick Piggin
2005-09-17  1:15                 ` Roman Zippel
2005-09-17  6:36                   ` Andrew Morton
2005-09-17 10:01                     ` Roman Zippel
2005-09-17  7:19                   ` David S. Miller
2005-09-17  7:34                   ` Dipankar Sarma
2005-09-18  8:08                   ` Nick Piggin
2005-09-17  0:59               ` Roman Zippel
2005-09-17  7:18                 ` David S. Miller
2005-09-17  7:27                   ` Russell King
2005-09-18  6:03                     ` David S. Miller
2005-09-14 15:17 ` [PATCH 1/5] atomic: introduce atomic_cmpxchg Russell King
2005-09-14 15:22   ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43283B66.8080005@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=Linux-Kernel@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=dipankar@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.