Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: [PATCH] drm/xe/pf: Move locking to xe_sriov_pf_reprovision_default
Date: Wed, 16 Sep 2026 23:29:49 +0200	[thread overview]
Message-ID: <20260916212949.13120-1-michal.wajdeczko@intel.com> (raw)

We should avoid taking the mutex in the helpers. Move guard from
the helper to the main entry function.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_sriov_pf_provision.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_provision.c b/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
index 0ec7ea83f12a..c37e422b5a5c 100644
--- a/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
+++ b/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
@@ -112,7 +112,7 @@ static int pf_reprovision_default(struct xe_device *xe)
 	int result = 0;
 	int err;
 
-	guard(mutex)(xe_sriov_pf_master_mutex(xe));
+	lockdep_assert_held(xe_sriov_pf_master_mutex(xe));
 
 	for_each_gt(gt, xe, id) {
 		err = xe_gt_sriov_pf_policy_set_sched_if_idle_locked(gt, false);
@@ -138,6 +138,8 @@ int xe_sriov_pf_reprovision_default(struct xe_device *xe)
 {
 	xe_assert(xe, IS_SRIOV_PF(xe));
 
+	guard(mutex)(xe_sriov_pf_master_mutex(xe));
+
 	if (!pf_auto_provisioning_mode(xe))
 		return 0;
 
-- 
2.47.1


             reply	other threads:[~2026-09-16 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 21:29 Michal Wajdeczko [this message]
2026-09-16 22:15 ` ✓ CI.KUnit: success for drm/xe/pf: Move locking to xe_sriov_pf_reprovision_default Patchwork
2026-09-16 22:55 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-17  3:10 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-21  7:08 ` [PATCH] " Piotr Piórkowski

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=20260916212949.13120-1-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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