parisc: Fix CONFIG_TLB_PTLOCK to work with lightweight spinlock checks
authorHelge Deller <deller@gmx.de>
Sun, 13 Aug 2023 20:11:19 +0000 (22:11 +0200)
committerHelge Deller <deller@gmx.de>
Mon, 14 Aug 2023 07:54:49 +0000 (09:54 +0200)
commit7a894c87374771f3cfb1b8e5453fbe03f1fb8135
treecbc33d9cdc7db86d67970edc18cd1e2d90c837fb
parent2ccdd1b13c591d306f0401d98dedc4bdcd02b421
parisc: Fix CONFIG_TLB_PTLOCK to work with lightweight spinlock checks

For the TLB_PTLOCK checks we used an optimization to store the spc
register into the spinlock to unlock it. This optimization works as
long as the lightweight spinlock checks (CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK)
aren't enabled, because they really check if the lock word is zero or
__ARCH_SPIN_LOCK_UNLOCKED_VAL and abort with a kernel crash
("Spinlock was trashed") otherwise.

Drop that optimization to make it possible to activate both checks
at the same time.

Noticed-by: Sam James <sam@gentoo.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Tested-by: Sam James <sam@gentoo.org>
Cc: stable@vger.kernel.org # v6.4+
Fixes: 15e64ef6520e ("parisc: Add lightweight spinlock checks")
arch/parisc/kernel/entry.S