Skip to content

Commit a58d487

Browse files
author
Maarten Lankhorst
committed
drm/ttm/tests: Fix build failure on PREEMPT_RT
Fix a compile error in the kunit tests when CONFIG_PREEMPT_RT is enabled, and the normal mutex is converted into a rtmutex. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202602261547.3bM6yVAS-lkp@intel.com/ Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20260304085616.1216961-1-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
1 parent 61ded10 commit a58d487

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/ttm/tests/ttm_bo_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@ static void ttm_bo_reserve_interrupted(struct kunit *test)
222222
KUNIT_FAIL(test, "Couldn't create ttm bo reserve task\n");
223223

224224
/* Take a lock so the threaded reserve has to wait */
225-
mutex_lock(&bo->base.resv->lock.base);
225+
dma_resv_lock(bo->base.resv, NULL);
226226

227227
wake_up_process(task);
228228
msleep(20);
229229
err = kthread_stop(task);
230230

231-
mutex_unlock(&bo->base.resv->lock.base);
231+
dma_resv_unlock(bo->base.resv);
232232

233233
KUNIT_ASSERT_EQ(test, err, -ERESTARTSYS);
234234
}

0 commit comments

Comments
 (0)