spinlock: remove redundant arch_*_relax operations
Subsystems (11)
cover spinlock: remove redundant arch_*_relax operations
Hi Andrew,
I've been carrying these for ages and, whilst they're boring cosmetic changes, I'd like to get them upstream so I can forget about this series.
The commit introducing the generic change making this possible went in with c14c338cb05c ("kernel/spinlock.c: add default arch_*_relax definitions for GENERIC_LOCKBREAK") back in September.
Cheers,
Will
Will Deacon (14):
ARC: locks: remove redundant arch_*_relax operations
ARM: locks: remove redundant arch_*_relax operations
arm64: locks: remove redundant arch_*_relax operations
blackfin: locks: remove redundant arch_*_relax operations
cris: locks: remove redundant arch_*_relax operations
ia64: locks: remove redundant arch_*_relax operations
m32r: locks: remove redundant arch_*_relax operations
metag: locks: remove redundant arch_*_relax operations
mips: locks: remove redundant arch_*_relax operations
hppa: locks: remove redundant arch_*_relax operations
s390: locks: remove redundant arch_*_relax operations
sh: locks: remove redundant arch_*_relax operations
sparc: locks: remove redundant arch_*_relax operations
x86: locks: remove redundant arch_*_relax operations
arch/arc/include/asm/spinlock.h | 4 ---- arch/arm/include/asm/spinlock.h | 4 ---- arch/arm64/include/asm/spinlock.h | 4 ---- arch/blackfin/include/asm/spinlock.h | 4 ---- arch/cris/include/arch-v32/arch/spinlock.h | 4 ---- arch/ia64/include/asm/spinlock.h | 4 ---- arch/m32r/include/asm/spinlock.h | 4 ---- arch/metag/include/asm/spinlock.h | 4 ---- arch/metag/include/asm/spinlock_lnkget.h | 7 ------- arch/mips/include/asm/spinlock.h | 4 ---- arch/parisc/include/asm/spinlock.h | 4 ---- arch/s390/include/asm/spinlock.h | 4 +--- arch/sh/include/asm/spinlock.h | 4 ---- arch/sparc/include/asm/spinlock_32.h | 4 ---- arch/sparc/include/asm/spinlock_64.h | 4 ---- arch/x86/include/asm/spinlock.h | 4 ---- 16 files changed, 1 insertion(+), 66 deletions(-)
Signature · 1 line
1.8.2.2
PATCH RESEND 1/14 ARC: locks: remove redundant arch_*_relax operations
Now that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for ARC.
--- arch/arc/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/arc/include/asm/spinlock.h +0 -4
@@ -144,8 +144,4 @@ static inline void arch_write_unlock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 2/14 ARM: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for ARM.
--- arch/arm/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/include/asm/spinlock.h +0 -4
@@ -289,8 +289,4 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 3/14 arm64: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for arm64.
--- arch/arm64/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/arm64/include/asm/spinlock.h +0 -4
@@ -227,8 +227,4 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_H */
Signature · 1 line
1.8.2.2
Re: [PATCH RESEND 03/14] arm64: locks: remove redundant arch_*_relax operations
Quoted 5 lines · Will Deacon
Now that the arch_{spin,read,write}_relax macros default to
cpu_relax(), remove the redundant definitions for arm64.Cc Catalin Marinas <[email protected]>Signed-off-by Will Deacon <[email protected]>
PATCH RESEND 4/14 blackfin: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for Blackfin.
--- arch/blackfin/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/blackfin/include/asm/spinlock.h +0 -4
@@ -96,10 +96,6 @@ static inline void arch_write_unlock(arch_rwlock_t *rw)__raw_write_unlock_asm (&rw->lock); } -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif #endif /* !__BFIN_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 5/14 cris: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for Cris.
--- arch/cris/include/arch-v32/arch/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/cris/include/arch-v32/arch/spinlock.h +0 -4
@@ -124,8 +124,4 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)#define _raw_read_lock_flags (lock, flags) _raw_read_lock(lock)#define _raw_write_lock_flags (lock, flags) _raw_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_ARCH_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 6/14 ia64: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for Itanium.
--- arch/ia64/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/ia64/include/asm/spinlock.h +0 -4
@@ -289,8 +289,4 @@ static inline int arch_read_trylock(arch_rwlock_t *x) return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word; } -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* _ASM_IA64_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 7/14 m32r: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for m32r.
--- arch/m32r/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/m32r/include/asm/spinlock.h +0 -4
@@ -320,8 +320,4 @@ static inline int arch_write_trylock(arch_rwlock_t *lock)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* _ASM_M32R_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 8/14 metag: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for metag. This patch also removes the duplicate definitions of arch_{read,write}_lock_flags.
--- arch/metag/include/asm/spinlock.h | 4 ---- arch/metag/include/asm/spinlock_lnkget.h | 7 ------- 2 files changed, 11 deletions(-)
arch/metag/include/asm/spinlock.h +0 -4
@@ -15,8 +15,4 @@#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_H */
arch/metag/include/asm/spinlock_lnkget.h +0 -7
@@ -239,11 +239,4 @@ static inline int arch_read_can_lock(arch_rwlock_t *rw) return tmp; } -#define arch_read_lock_flags (lock, flags) arch_read_lock(lock) -#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) - -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_LNKGET_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 9/14 mips: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for MIPS.
--- arch/mips/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/mips/include/asm/spinlock.h +0 -4
@@ -419,8 +419,4 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* _ASM_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 10/14 hppa: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for parisc.
--- arch/parisc/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/parisc/include/asm/spinlock.h +0 -4
@@ -191,8 +191,4 @@ static __inline__ int arch_write_can_lock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_H */
Signature · 1 line
1.8.2.2
Helge Deller
maintainerPATCH RESEND 10/14 hppa: locks: remove redundant arch_*_relax operations
Forwarding to parisc patchwork...
-------- Original Message --------
Subject: [PATCH RESEND 10/14] hppa: locks: remove redundant arch_*_relax operations
Date: Fri, 21 Feb 2014 17:34:57 +0000
From: Will Deacon <[email protected]>
To: [email protected]
CC: [email protected], Will Deacon <[email protected]>, Helge Deller <[email protected]>
Now that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for parisc.
--- arch/parisc/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/parisc/include/asm/spinlock.h +0 -3
@@ -191,8 +191,4 @@ static __inline__ int arch_write_can_lock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax()
PATCH RESEND 11/14 s390: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{read,write}_relax macros default to cpu_relax(), remove the redundant definitions for S390.
Since S390 provides an arch_spin_relax implementation, that function is left alone and additionally defined as a macro, so the LOCKBREAK code will pick it up.
--- arch/s390/include/asm/spinlock.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/s390/include/asm/spinlock.h +1 -3
@@ -43,6 +43,7 @@ extern void arch_spin_lock_wait(arch_spinlock_t *);extern void arch_spin_lock_wait_flags (arch_spinlock_t *,unsigned long flags);extern int arch_spin_trylock_retry (arch_spinlock_t *);extern void arch_spin_relax (arch_spinlock_t *lock); +#define arch_spin_relax arch_spin_relaxstatic inline int arch_spin_value_unlocked (arch_spinlock_t lock) {
@@ -175,7 +176,4 @@ static inline int arch_write_trylock(arch_rwlock_t *rw) return _raw_write_trylock_retry(rw); } -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 12/14 sh: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for SuperH.
--- arch/sh/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/sh/include/asm/spinlock.h +0 -4
@@ -219,8 +219,4 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)#define arch_read_lock_flags (lock, flags) arch_read_lock(lock)#define arch_write_lock_flags (lock, flags) arch_write_lock(lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* __ASM_SH_SPINLOCK_H */
Signature · 1 line
1.8.2.2
PATCH RESEND 13/14 sparc: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for Sparc.
--- arch/sparc/include/asm/spinlock_32.h | 4 ---- arch/sparc/include/asm/spinlock_64.h | 4 ---- 2 files changed, 8 deletions(-)
arch/sparc/include/asm/spinlock_32.h +0 -4
@@ -188,10 +188,6 @@ static inline int __arch_read_trylock(arch_rwlock_t *rw)#define arch_read_lock_flags (rw, flags) arch_read_lock(rw)#define arch_write_lock_flags (rw, flags) arch_write_lock(rw) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#define arch_read_can_lock (rw) (!((rw)->lock & 0xff))#define arch_write_can_lock (rw) (!(rw)->lock)
arch/sparc/include/asm/spinlock_64.h +0 -4
@@ -216,10 +216,6 @@ static int inline arch_write_trylock(arch_rwlock_t *lock)#define arch_read_can_lock (rw) (!((rw)->lock & 0x80000000UL))#define arch_write_can_lock (rw) (!(rw)->lock) -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC64_SPINLOCK_H) */
Signature · 1 line
1.8.2.2
PATCH RESEND 14/14 x86: locks: remove redundant arch_*_relax operations
In reply to Will DeaconNow that the arch_{spin,read,write}_relax macros default to cpu_relax(), remove the redundant definitions for x86.
--- arch/x86/include/asm/spinlock.h | 4 ---- 1 file changed, 4 deletions(-)
arch/x86/include/asm/spinlock.h +0 -4
@@ -280,8 +280,4 @@ static inline void arch_write_unlock(arch_rwlock_t *rw)#undef WRITE_LOCK_SUB#undef WRITE_LOCK_CMP -#define arch_spin_relax (lock) cpu_relax() -#define arch_read_relax (lock) cpu_relax() -#define arch_write_relax (lock) cpu_relax() -#endif /* _ASM_X86_SPINLOCK_H */
Signature · 1 line
1.8.2.2
Re: [PATCH RESEND 14/14] x86: locks: remove redundant arch_*_relax operations
Quoted 7 lines · Will Deacon
Now that the arch_{spin,read,write}_relax macros default to
cpu_relax(), remove the redundant definitions for x86.Cc Ingo Molnar <[email protected]>Cc H. Peter Anvin <[email protected]>Acked-by Thomas Gleixner <[email protected]>Signed-off-by Will Deacon <[email protected]>