linux/arch/parisc
Helge Deller a0f4b7879f 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: 15e64ef652 ("parisc: Add lightweight spinlock checks")
2023-08-10 17:32:09 +02:00
..
boot Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
configs arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
include parisc: Fix lightweight spinlock checks to not break futexes 2023-08-10 17:32:09 +02:00
kernel parisc: Fix lightweight spinlock checks to not break futexes 2023-08-10 17:32:09 +02:00
lib parisc: Drop homebrewn io[read|write]64_[lo_hi|hi_lo] 2022-09-23 21:52:27 +02:00
math-emu parisc: math-emu: Avoid compiler warnings with W=1 2023-07-03 18:56:03 +02:00
mm parisc/mm: preallocate fixmap page tables at init 2023-08-03 14:40:37 +02:00
video fbdev: Include <linux/fb.h> instead of <asm/fb.h> 2023-05-18 11:06:21 +02:00
defpalo.conf
install.sh kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig parisc: Default to 8 CPUs for 64-bit kernel 2023-06-30 17:14:14 +02:00
Kconfig.debug parisc: Fix lightweight spinlock checks to not break futexes 2023-08-10 17:32:09 +02:00
Makefile arch/parisc: Implement fb_is_primary_device() under arch/parisc 2023-04-20 10:04:58 +02:00