summaryrefslogtreecommitdiff
path: root/arch/parisc/Kconfig.debug
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-08-09 09:21:58 +0200
committerHelge Deller <deller@gmx.de>2023-08-10 17:32:09 +0200
commita0f4b7879f2e14986200747d1b545e5daac8c624 (patch)
tree90c0f9302627476b43a470ad87cb33d24ec27c35 /arch/parisc/Kconfig.debug
parenta027b2eca0b7e90b11a0b0ddfad0dc4068707799 (diff)
parisc: Fix lightweight spinlock checks to not break futexes
The lightweight spinlock checks verify that a spinlock has either value 0 (spinlock locked) and that not any other bits than in __ARCH_SPIN_LOCK_UNLOCKED_VAL is set. This breaks the current LWS code, which writes the address of the lock into the lock word to unlock it, which was an optimization to save one assembler instruction. Fix it by making spinlock_types.h accessible for asm code, change the LWS spinlock-unlocking code to write __ARCH_SPIN_LOCK_UNLOCKED_VAL into the lock word, and add some missing lightweight spinlock checks to the LWS path. Finally, make the spinlock checks dependend on DEBUG_KERNEL. Noticed-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de> Tested-by: John David Anglin <dave.anglin@bell.net> Cc: stable@vger.kernel.org # v6.4+ Fixes: 15e64ef6520e ("parisc: Add lightweight spinlock checks")
Diffstat (limited to 'arch/parisc/Kconfig.debug')
-rw-r--r--arch/parisc/Kconfig.debug2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index 1401e4c5fe5f..bf2b21b96f0b 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -2,7 +2,7 @@
#
config LIGHTWEIGHT_SPINLOCK_CHECK
bool "Enable lightweight spinlock checks"
- depends on SMP && !DEBUG_SPINLOCK
+ depends on DEBUG_KERNEL && SMP && !DEBUG_SPINLOCK
default y
help
Add checks with low performance impact to the spinlock functions