Skip to content

Commit 40e6073

Browse files
guoren83palmer-dabbelt
authored andcommitted
riscv: qspinlock: Fixup _Q_PENDING_LOOPS definition
When CONFIG_RISCV_QUEUED_SPINLOCKS=y, the _Q_PENDING_LOOPS definition is missing. Add the _Q_PENDING_LOOPS definition for pure qspinlock usage. Fixes: ab83647 ("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>
1 parent 51356ce commit 40e6073

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

arch/riscv/include/asm/spinlock.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
#ifndef __ASM_RISCV_SPINLOCK_H
44
#define __ASM_RISCV_SPINLOCK_H
55

6-
#ifdef CONFIG_RISCV_COMBO_SPINLOCKS
6+
#ifdef CONFIG_QUEUED_SPINLOCKS
77
#define _Q_PENDING_LOOPS (1 << 9)
8+
#endif
9+
10+
#ifdef CONFIG_RISCV_COMBO_SPINLOCKS
811

912
#define __no_arch_spinlock_redefine
1013
#include <asm/ticket_spinlock.h>

0 commit comments

Comments
 (0)