• Helge Deller's avatar
    parisc: Fix CONFIG_TLB_PTLOCK to work with lightweight spinlock checks · 7a894c87
    Helge Deller authored
    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: default avatarSam James <sam@gentoo.org>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    Tested-by: default avatarSam James <sam@gentoo.org>
    Cc: stable@vger.kernel.org # v6.4+
    Fixes: 15e64ef6 ("parisc: Add lightweight spinlock checks")
    7a894c87
entry.S 53.4 KB