drivers/gpu/drm/xe/xe_pt.c:1418:13: warning: 'xe_pt_svm_userptr_notifier_lock' defined but not used
kernel test robot
build bottree: https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next head: e459a3bdeb117be496d7f229e2ea1f6c9fe4080b commit: 80ccbd97ffee8ad2e73167d826fe7be548364365 [1/3] drm/xe/userptr: Hold notifier_lock for write on inject test path config: um-allyesconfig (https://download.01.org/0day-ci/archive/20260630/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260630/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/xe/xe_pt.c:1418:13: warning: 'xe_pt_svm_userptr_notifier_lock' defined but not used [-Wunused-function]
1418 | static void xe_pt_svm_userptr_notifier_lock(struct xe_vm *vm)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/xe_pt_svm_userptr_notifier_lock +1418 drivers/gpu/drm/xe/xe_pt.c
1408
1409 /*
1410 * Acquire/release the svm notifier_lock around xe_pt_svm_userptr_pre_commit()
1411 * and the matching late release in xe_pt_update_ops_run(). Read mode by
1412 * default; write mode when CONFIG_DRM_XE_USERPTR_INVAL_INJECT is on,
1413 * because a userptr op in this critical section may invoke the injected
1414 * xe_vma_userptr_force_invalidate() path that calls
1415 * drm_gpusvm_unmap_pages() with ctx->in_notifier=true, which requires the
1416 * lock held for write.
1417 */
> 1418 static void xe_pt_svm_userptr_notifier_lock(struct xe_vm *vm)
1419 {
1420 #if IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT)
1421 down_write(&vm->svm.gpusvm.notifier_lock);
1422 #else
1423 xe_svm_notifier_lock(vm);
1424 #endif
1425 }
1426
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki