riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
Subsystems (2)
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.
--- arch/riscv/include/asm/spinlock.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/riscv/include/asm/spinlock.h +4 -1
@@ -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
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_LOOPSdefinition is missing. Add the_Q_PENDING_LOOPSdefinition for pure qspinlock usage.Fixes ab83647fadae ("riscv: Add qspinlock support")Signed-off-by Guo Ren <[email protected]>Signed-off-by Guo Ren <[email protected]>--- arch/riscv/include/asm/spinlock.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)arch/riscv/include/asm/spinlock.h +0
-0@@ -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
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_LOOPSdefinition is missing. Add the_Q_PENDING_LOOPSdefinition for pure qspinlock usage.Fixes ab83647fadae ("riscv: Add qspinlock support")Signed-off-by Guo Ren <[email protected]>Signed-off-by Guo Ren <[email protected]>[...]
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