lockdep/selftests: Adapt ww-tests for PREEMPT_RT
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 29 Nov 2021 17:46:52 +0000 (18:46 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 4 Dec 2021 09:56:24 +0000 (10:56 +0100)
commit9a75bd0c52df6cff44735f73dfb9d00e67969fc5
treeb7b401496881bf9c3e88b155cced5a585d5ada6d
parenta529f8db897625859b640b565325463e5d5ff01e
lockdep/selftests: Adapt ww-tests for PREEMPT_RT

The ww-mutex selftest operates directly on ww_mutex::base and assumes
its type is struct mutex. This isn't true on PREEMPT_RT which turns the
mutex into a rtmutex.

Add a ww_mutex_base_ abstraction which maps to the relevant mutex_ or
rt_mutex_ function.
Change the CONFIG_DEBUG_MUTEXES ifdef to DEBUG_WW_MUTEXES. The latter is
true for the MUTEX and RTMUTEX implementation of WW-MUTEX. The
assignment is required in order to pass the tests.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20211129174654.668506-10-bigeasy@linutronix.de
lib/locking-selftest.c