public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
@ 2024-12-15 13:52 guoren
  2024-12-16  8:23 ` Alexandre Ghiti
  2025-01-09 16:16 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 3+ messages in thread
From: guoren @ 2024-12-15 13:52 UTC (permalink / raw)
  To: paul.walmsley, palmer, guoren, bjorn, conor, leobras, peterz,
	parri.andrea, will, longman, boqun.feng, arnd, alexghiti
  Cc: linux-riscv, linux-kernel, Guo Ren

From: Guo Ren <guoren@linux.alibaba.com>

When CONFIG_RISCV_QUEUED_SPINLOCKS=y, the _Q_PENDING_LOOPS
definition is missing. Add the _Q_PENDING_LOOPS definition for
pure qspinlock usage.

Fixes: ab83647fadae ("riscv: Add qspinlock support")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
---
 arch/riscv/include/asm/spinlock.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/spinlock.h b/arch/riscv/include/asm/spinlock.h
index e5121b89acea..52f11bfd0079 100644
--- a/arch/riscv/include/asm/spinlock.h
+++ b/arch/riscv/include/asm/spinlock.h
@@ -3,8 +3,11 @@
 #ifndef __ASM_RISCV_SPINLOCK_H
 #define __ASM_RISCV_SPINLOCK_H
 
-#ifdef CONFIG_RISCV_COMBO_SPINLOCKS
+#ifdef CONFIG_QUEUED_SPINLOCKS
 #define _Q_PENDING_LOOPS	(1 << 9)
+#endif
+
+#ifdef CONFIG_RISCV_COMBO_SPINLOCKS
 
 #define __no_arch_spinlock_redefine
 #include <asm/ticket_spinlock.h>
-- 
2.40.1


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

* Re: [PATCH] riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
  2024-12-15 13:52 [PATCH] riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition guoren
@ 2024-12-16  8:23 ` Alexandre Ghiti
  2025-01-09 16:16 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Ghiti @ 2024-12-16  8:23 UTC (permalink / raw)
  To: guoren, paul.walmsley, palmer, bjorn, conor, leobras, peterz,
	parri.andrea, will, longman, boqun.feng, arnd, alexghiti
  Cc: linux-riscv, linux-kernel, Guo Ren

Hi Guo,

On 15/12/2024 14:52, guoren@kernel.org wrote:
> From: Guo Ren <guoren@linux.alibaba.com>
>
> When CONFIG_RISCV_QUEUED_SPINLOCKS=y, the _Q_PENDING_LOOPS
> definition is missing. Add the _Q_PENDING_LOOPS definition for
> pure qspinlock usage.
>
> Fixes: ab83647fadae ("riscv: Add qspinlock support")
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> ---
>   arch/riscv/include/asm/spinlock.h | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/include/asm/spinlock.h b/arch/riscv/include/asm/spinlock.h
> index e5121b89acea..52f11bfd0079 100644
> --- a/arch/riscv/include/asm/spinlock.h
> +++ b/arch/riscv/include/asm/spinlock.h
> @@ -3,8 +3,11 @@
>   #ifndef __ASM_RISCV_SPINLOCK_H
>   #define __ASM_RISCV_SPINLOCK_H
>   
> -#ifdef CONFIG_RISCV_COMBO_SPINLOCKS
> +#ifdef CONFIG_QUEUED_SPINLOCKS
>   #define _Q_PENDING_LOOPS	(1 << 9)
> +#endif
> +
> +#ifdef CONFIG_RISCV_COMBO_SPINLOCKS
>   
>   #define __no_arch_spinlock_redefine
>   #include <asm/ticket_spinlock.h>


Yep, good catch!

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex


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

* Re: [PATCH] riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
  2024-12-15 13:52 [PATCH] riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition guoren
  2024-12-16  8:23 ` Alexandre Ghiti
@ 2025-01-09 16:16 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2025-01-09 16:16 UTC (permalink / raw)
  To: Guo Ren
  Cc: linux-riscv, paul.walmsley, palmer, bjorn, conor, leobras, peterz,
	parri.andrea, will, longman, boqun.feng, arnd, alexghiti,
	linux-kernel, guoren

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Sun, 15 Dec 2024 08:52:52 -0500 you wrote:
> From: Guo Ren <guoren@linux.alibaba.com>
> 
> When CONFIG_RISCV_QUEUED_SPINLOCKS=y, the _Q_PENDING_LOOPS
> definition is missing. Add the _Q_PENDING_LOOPS definition for
> pure qspinlock usage.
> 
> Fixes: ab83647fadae ("riscv: Add qspinlock support")
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> 
> [...]

Here is the summary with links:
  - riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
    https://git.kernel.org/riscv/c/40e6073e7648

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-01-09 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-15 13:52 [PATCH] riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition guoren
2024-12-16  8:23 ` Alexandre Ghiti
2025-01-09 16:16 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox