On 2024-04-04 12:25:36 [+0200], To dri-devel@xxxxxxxxxxxxxxxxxxxxx wrote: > PREEMPT_RT has a different locking implementation for ww_mutex. The > base mutex of struct ww_mutex is declared as struct WW_MUTEX_BASE. The > latter is defined as `mutex' for non-PREEMPT_RT builds and `rt_mutex' > for PREEMPT_RT builds. > > Using mutex_lock() directly on the base mutex in > ttm_bo_reserve_deadlock() leads to compile error on PREEMPT_RT. > > The locking-selftest has its own defines to deal with this and it is > probably best to defines the needed one within the test program since > their usefulness is limited outside of well known selftests. > > Provide ww_mutex_base_lock() which points to the correct function for > PREEMPT_RT and non-PREEMPT_RT builds. > > Fixes: 995279d280d1e ("drm/ttm/tests: Add tests for ttm_bo functions") > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> > --- > > For the record, testing led to > | WARNING: CPU: 5 PID: 2089 at include/drm/ttm/ttm_bo.h:247 ttm_bo_reserve_no_wait_ticket+0xe8/0x150 [ttm_bo_test] > > but this occurred with and without RT on v6.9-rc2. a friendly ping. Sebastian