From: Matthew Brost <matthew.brost@intel.com>
To: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/xe/userptr: Stub notifier_lock helpers when DRM_GPUSVM=n
Date: Wed, 8 Jul 2026 15:45:34 -0700 [thread overview]
Message-ID: <ak7TDhMMPC6LDZp+@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <20260630192221.2998168-1-shuicheng.lin@intel.com>
On Tue, Jun 30, 2026 at 07:22:21PM +0000, Shuicheng Lin wrote:
> When CONFIG_DRM_GPUSVM=n (e.g. um-allyesconfig), the only caller of
> xe_pt_svm_userptr_notifier_lock() is compiled out, triggering:
>
> drivers/gpu/drm/xe/xe_pt.c:1418:13: warning:
> 'xe_pt_svm_userptr_notifier_lock' defined but not used
> [-Wunused-function]
>
> The helpers cannot simply be removed in this case: the matching
> xe_pt_svm_userptr_notifier_unlock() is also referenced from
> xe_pt_update_ops_run(), which lives outside any DRM_GPUSVM ifdef and is
> gated only at runtime by pt_update_ops->needs_svm_lock. The symbol must
> exist in all builds.
>
> Provide empty static inline stubs for !DRM_GPUSVM, matching the pattern
> used by xe_svm_notifier_lock()/_unlock() in xe_svm.h.
>
> Fixes: 80ccbd97ffee ("drm/xe/userptr: Hold notifier_lock for write on inject test path")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202606302210.QqcLbOEN-lkp@intel.com/
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pt.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
> index 4f0f438d6b9b..20b9611e993b 100644
> --- a/drivers/gpu/drm/xe/xe_pt.c
> +++ b/drivers/gpu/drm/xe/xe_pt.c
> @@ -1406,6 +1406,7 @@ static int xe_pt_pre_commit(struct xe_migrate_pt_update *pt_update)
> pt_update_ops, rftree);
> }
>
> +#if IS_ENABLED(CONFIG_DRM_GPUSVM)
> /*
> * Acquire/release the svm notifier_lock around xe_pt_svm_userptr_pre_commit()
> * and the matching late release in xe_pt_update_ops_run(). Read mode by
> @@ -1432,6 +1433,10 @@ static void xe_pt_svm_userptr_notifier_unlock(struct xe_vm *vm)
> xe_svm_notifier_unlock(vm);
> #endif
> }
> +#else
> +static inline void xe_pt_svm_userptr_notifier_lock(struct xe_vm *vm) { }
> +static inline void xe_pt_svm_userptr_notifier_unlock(struct xe_vm *vm) { }
> +#endif
>
> #if IS_ENABLED(CONFIG_DRM_GPUSVM)
> #ifdef CONFIG_DRM_XE_USERPTR_INVAL_INJECT
> --
> 2.43.0
>
prev parent reply other threads:[~2026-07-08 22:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 19:22 [PATCH] drm/xe/userptr: Stub notifier_lock helpers when DRM_GPUSVM=n Shuicheng Lin
2026-06-30 19:29 ` ✓ CI.KUnit: success for " Patchwork
2026-06-30 20:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-01 14:56 ` ✓ Xe.CI.FULL: " Patchwork
2026-07-08 22:52 ` Lin, Shuicheng
2026-07-08 22:45 ` Matthew Brost [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ak7TDhMMPC6LDZp+@gsse-cloud1.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lkp@intel.com \
--cc=shuicheng.lin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox