linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: qspinlock: Use asm-generic definition for queued_spin_lock
@ 2022-12-06  5:51 Rohan McLure
  2022-12-07 11:46 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Rohan McLure @ 2022-12-06  5:51 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Rohan McLure, npiggin

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

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
 arch/powerpc/include/asm/qspinlock.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/powerpc/include/asm/qspinlock.h b/arch/powerpc/include/asm/qspinlock.h
index b676c4fb90fd..bf5ba0f00258 100644
--- a/arch/powerpc/include/asm/qspinlock.h
+++ b/arch/powerpc/include/asm/qspinlock.h
@@ -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 */
 
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: qspinlock: Use asm-generic definition for queued_spin_lock
  2022-12-06  5:51 [PATCH] powerpc: qspinlock: Use asm-generic definition for queued_spin_lock Rohan McLure
@ 2022-12-07 11:46 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-12-07 11:46 UTC (permalink / raw)
  To: Rohan McLure, linuxppc-dev; +Cc: Rohan McLure, npiggin

Rohan McLure <rmclure@linux.ibm.com> writes:
> 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


> diff --git a/arch/powerpc/include/asm/qspinlock.h b/arch/powerpc/include/asm/qspinlock.h
> index b676c4fb90fd..bf5ba0f00258 100644
> --- a/arch/powerpc/include/asm/qspinlock.h
> +++ b/arch/powerpc/include/asm/qspinlock.h
> @@ -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 */
>  
> -- 
> 2.37.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-07 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06  5:51 [PATCH] powerpc: qspinlock: Use asm-generic definition for queued_spin_lock Rohan McLure
2022-12-07 11:46 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).