Skip to contentSkip to conversation

riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition

PATCH Applied [email protected] 3 participants 3 messages Dec 15, 2024 – Jan 9, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition

From: Guo Ren <[email protected]>

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")
---
 arch/riscv/include/asm/spinlock.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/riscv/include/asm/spinlock.h +4 -1
index e5121b89acea..52f11bfd0079 100644
@@ -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>
Signature · 1 line
2.40.1
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Guo,

Quoted 20 lines · On 15/12/2024 14:52, [email protected] wrote:

From: Guo Ren <[email protected]>

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")
---
  arch/riscv/include/asm/spinlock.h | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
arch/riscv/include/asm/spinlock.h +0 -0
index e5121b89acea..52f11bfd0079 100644
@@ -3,8 +3,11 @@
  #ifndef __ASM_RISCV_SPINLOCK_H
  #define __ASM_RISCV_SPINLOCK_H

arch/riscv/include/asm/spinlock.h line 13

Quoted 10 lines
arch/riscv/include/asm/spinlock.h +4 -1
 
-#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!

Thanks,

Alex

#2 lore raw
In reply to [email protected]
This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <[email protected]>:

Quoted 11 lines · On Sun, 15 Dec 2024 08:52:52 -0500 you wrote:

From: Guo Ren <[email protected]>

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")

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html