]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
authorGuo Ren <guoren@linux.alibaba.com>
Sun, 15 Dec 2024 13:52:52 +0000 (08:52 -0500)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 8 Jan 2025 18:46:01 +0000 (10:46 -0800)
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>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20241215135252.201983-1-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/spinlock.h

index e5121b89aceaca438020ab8ae2438fca33bf61ce..52f11bfd0079bd5fd27d7f32a9075035ffd8970e 100644 (file)
@@ -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>