]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/ttm/tests: Fix build failure on PREEMPT_RT
authorMaarten Lankhorst <dev@lankhorst.se>
Wed, 4 Mar 2026 08:56:16 +0000 (09:56 +0100)
committerMaarten Lankhorst <dev@lankhorst.se>
Wed, 4 Mar 2026 10:31:54 +0000 (11:31 +0100)
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>
drivers/gpu/drm/ttm/tests/ttm_bo_test.c

index d468f832207209c2af99f65d6170ae53708d832e..f3103307b5df985c2b4940f37f74afc45260ef14 100644 (file)
@@ -222,13 +222,13 @@ static void ttm_bo_reserve_interrupted(struct kunit *test)
                KUNIT_FAIL(test, "Couldn't create ttm bo reserve task\n");
 
        /* Take a lock so the threaded reserve has to wait */
-       mutex_lock(&bo->base.resv->lock.base);
+       dma_resv_lock(bo->base.resv, NULL);
 
        wake_up_process(task);
        msleep(20);
        err = kthread_stop(task);
 
-       mutex_unlock(&bo->base.resv->lock.base);
+       dma_resv_unlock(bo->base.resv);
 
        KUNIT_ASSERT_EQ(test, err, -ERESTARTSYS);
 }