Skip to contentSkip to conversation

powerpc: qspinlock: Use asm-generic definition for queued_spin_lock

PATCH In review Rohan McLure 2 participants 2 messages Dec 6, 2022 – Dec 7, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: qspinlock: Use asm-generic definition for queued_spin_lock

asm-generic/qspinlock.h provides an identical implementation of queued_spin_lock. Remove the variant in asm/qspinlock.h.

---
 arch/powerpc/include/asm/qspinlock.h | 11 -----------
 1 file changed, 11 deletions(-)
arch/powerpc/include/asm/qspinlock.h +0 -11
index b676c4fb90fd..bf5ba0f00258 100644
@@ -33,17 +33,6 @@ static inline void queued_spin_unlock(struct qspinlock *lock)
 extern void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val);
 #endif
 
-static __always_inline void queued_spin_lock(struct qspinlock *lock)
-{
-	u32 val = 0;
-
-	if (likely(arch_atomic_try_cmpxchg_lock(&lock->val, &val, _Q_LOCKED_VAL)))
-		return;
-
-	queued_spin_lock_slowpath(lock, val);
-}
-#define queued_spin_lock queued_spin_lock
-
 #ifdef CONFIG_PARAVIRT_SPINLOCKS
 #define SPIN_THRESHOLD (1<<15) /* not tuned */
 
Signature · 1 line
2.37.2
#1 lore raw
Quoted 2 lines · Rohan McLure

asm-generic/qspinlock.h provides an identical implementation of queued_spin_lock. Remove the variant in asm/qspinlock.h.

This code has changed recently, so this patch no longer applies.

See 9f61521c7a28 ("powerpc/qspinlock: powerpc qspinlock implementation") in powerpc/next.

cheers

Quoted 24 lines
arch/powerpc/include/asm/qspinlock.h +0 -11
index b676c4fb90fd..bf5ba0f00258 100644
@@ -33,17 +33,6 @@ static inline void queued_spin_unlock(struct qspinlock *lock)
 extern void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val);
 #endif
 
-static __always_inline void queued_spin_lock(struct qspinlock *lock)
-{
-	u32 val = 0;
-
-	if (likely(arch_atomic_try_cmpxchg_lock(&lock->val, &val, _Q_LOCKED_VAL)))
-		return;
-
-	queued_spin_lock_slowpath(lock, val);
-}
-#define queued_spin_lock queued_spin_lock
-
 #ifdef CONFIG_PARAVIRT_SPINLOCKS
 #define SPIN_THRESHOLD (1<<15) /* not tuned */
 
Signature · 1 line
2.37.2