From 52393ccc0a53c130f31fbbdb8b40b2aadb55ee72 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 14 Jul 2006 16:05:03 -0400 Subject: [PATCH] [PATCH] remove set_wmb - arch removal set_wmb should not be used in the kernel because it just confuses the code more and has no benefit. Since it is not currently used in the kernel this patch removes it so that new code does not include it. All archs define set_wmb(var, value) to do { var = value; wmb(); } while(0) except ia64 and sparc which use a mb() instead. But this is still moot since it is not used anyway. Hasn't been tested on any archs but x86 and x86_64 (and only compiled tested) Signed-off-by: Steven Rostedt Signed-off-by: Linus Torvalds --- include/asm-alpha/barrier.h | 3 --- include/asm-arm/system.h | 1 - include/asm-arm26/system.h | 1 - include/asm-cris/system.h | 1 - include/asm-frv/system.h | 1 - include/asm-h8300/system.h | 1 - include/asm-i386/system.h | 2 -- include/asm-ia64/system.h | 3 +-- include/asm-m32r/system.h | 1 - include/asm-m68k/system.h | 1 - include/asm-m68knommu/system.h | 1 - include/asm-mips/system.h | 3 --- include/asm-parisc/system.h | 2 -- include/asm-powerpc/system.h | 1 - include/asm-ppc/system.h | 1 - include/asm-s390/system.h | 1 - include/asm-sh/system.h | 1 - include/asm-sh64/system.h | 1 - include/asm-sparc/system.h | 1 - include/asm-sparc64/system.h | 2 -- include/asm-v850/system.h | 1 - include/asm-x86_64/system.h | 1 - include/asm-xtensa/system.h | 1 - 23 files changed, 1 insertion(+), 31 deletions(-) diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h index 681ff581af..384dc08d6f 100644 --- a/include/asm-alpha/barrier.h +++ b/include/asm-alpha/barrier.h @@ -30,7 +30,4 @@ __asm__ __volatile__("mb": : :"memory") #define set_mb(var, value) \ do { var = value; mb(); } while (0) -#define set_wmb(var, value) \ -do { var = value; wmb(); } while (0) - #endif /* __BARRIER_H */ diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 6001febfe6..0947cbf9b6 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -176,7 +176,6 @@ extern unsigned int user_debug; #define wmb() mb() #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); /* diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h index d1f69d7061..00ae32aa1d 100644 --- a/include/asm-arm26/system.h +++ b/include/asm-arm26/system.h @@ -90,7 +90,6 @@ extern unsigned int user_debug; #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) /* * We assume knowledge of how diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b1c593b6db..b869f6161a 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h @@ -17,7 +17,6 @@ extern struct task_struct *resume(struct task_struct *prev, struct task_struct * #define wmb() mb() #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index 351863dfd0..1166899317 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h @@ -179,7 +179,6 @@ do { \ #define rmb() asm volatile ("membar" : : :"memory") #define wmb() asm volatile ("membar" : : :"memory") #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define smp_mb() mb() #define smp_rmb() rmb() diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h index 134e0929fc..5084a9d429 100644 --- a/include/asm-h8300/system.h +++ b/include/asm-h8300/system.h @@ -84,7 +84,6 @@ asmlinkage void resume(void); #define wmb() asm volatile ("" : : :"memory") #define set_rmb(var, value) do { xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 2db168ef94..49928eb33f 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -453,8 +453,6 @@ static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long l #define set_mb(var, value) do { var = value; barrier(); } while (0) #endif -#define set_wmb(var, value) do { var = value; wmb(); } while (0) - #include /* diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 65db43ce4d..fc9677bc87 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h @@ -98,12 +98,11 @@ extern struct ia64_boot_param { #endif /* - * XXX check on these---I suspect what Linus really wants here is + * XXX check on this ---I suspect what Linus really wants here is * acquire vs release semantics but we can't discuss this stuff with * Linus just yet. Grrr... */ #define set_mb(var, value) do { (var) = (value); mb(); } while (0) -#define set_wmb(var, value) do { (var) = (value); mb(); } while (0) #define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 311cebf44e..9e618afec6 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -336,7 +336,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #endif #define set_mb(var, value) do { xchg(&var, value); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define arch_align_stack(x) (x) diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index d6dd8052cd..131a0cb0f4 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h @@ -80,7 +80,6 @@ static inline int irqs_disabled(void) #define wmb() barrier() #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { xchg(&var, value); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define smp_mb() barrier() #define smp_rmb() barrier() diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 2bbe2db00a..2a81449867 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h @@ -106,7 +106,6 @@ asmlinkage void resume(void); #define wmb() asm volatile ("" : : :"memory") #define set_rmb(var, value) do { xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 13c98dde82..dcb4701d57 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -143,9 +143,6 @@ #define set_mb(var, value) \ do { var = value; mb(); } while (0) -#define set_wmb(var, value) \ -do { var = value; wmb(); } while (0) - /* * switch_to(n) should switch tasks to task nr n, first * checking that n isn't the current task, in which case it does nothing. diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 5fe2d2329a..74f037a39e 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h @@ -143,8 +143,6 @@ static inline void set_eiem(unsigned long val) #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) - #ifndef CONFIG_PA20 /* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data, diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index c6569516ba..7307aa7756 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h @@ -39,7 +39,6 @@ #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef __KERNEL__ #ifdef CONFIG_SMP diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index fb49c0c49e..738943584c 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h @@ -33,7 +33,6 @@ #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 9ab186ffde..36a3a85d61 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h @@ -299,7 +299,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef __s390x__ diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index ce2e60664a..ad35ad4958 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h @@ -101,7 +101,6 @@ extern void __xchg_called_with_bad_pointer(void); #endif #define set_mb(var, value) do { xchg(&var, value); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) /* Interrupt Control */ static __inline__ void local_irq_enable(void) diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h index 7606f6e1f0..87ef6f1ad5 100644 --- a/include/asm-sh64/system.h +++ b/include/asm-sh64/system.h @@ -66,7 +66,6 @@ extern void __xchg_called_with_bad_pointer(void); #define set_rmb(var, value) do { xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) /* Interrupt Control */ #ifndef HARD_CLI diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index cb7dda1e5e..100c3eaf3c 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h @@ -199,7 +199,6 @@ static inline unsigned long getipl(void) #define wmb() mb() #define read_barrier_depends() do { } while(0) #define set_mb(__var, __value) do { __var = __value; mb(); } while(0) -#define set_wmb(__var, __value) set_mb(__var, __value) #define smp_mb() __asm__ __volatile__("":::"memory") #define smp_rmb() __asm__ __volatile__("":::"memory") #define smp_wmb() __asm__ __volatile__("":::"memory") diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 4ca68600c6..a8b7432c9a 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h @@ -123,8 +123,6 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ #define read_barrier_depends() do { } while(0) #define set_mb(__var, __value) \ do { __var = __value; membar_storeload_storestore(); } while(0) -#define set_wmb(__var, __value) \ - do { __var = __value; wmb(); } while(0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-v850/system.h b/include/asm-v850/system.h index 7091af4b78..da39916f10 100644 --- a/include/asm-v850/system.h +++ b/include/asm-v850/system.h @@ -68,7 +68,6 @@ static inline int irqs_disabled (void) #define read_barrier_depends() ((void)0) #define set_rmb(var, value) do { xchg (&var, value); } while (0) #define set_mb(var, value) set_rmb (var, value) -#define set_wmb(var, value) do { var = value; wmb (); } while (0) #define smp_mb() mb () #define smp_rmb() rmb () diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index f67f2873a9..6bf170bcea 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h @@ -240,7 +240,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, #endif #define read_barrier_depends() do {} while(0) #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index f986170bd2..932bda92a2 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h @@ -99,7 +99,6 @@ static inline void disable_coprocessor(int i) #endif #define set_mb(var, value) do { var = value; mb(); } while (0) -#define set_wmb(var, value) do { var = value; wmb(); } while (0) #if !defined (__ASSEMBLY__) -- 2.39.5