Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/pf: Move locking to xe_sriov_pf_reprovision_default
@ 2026-09-16 21:29 Michal Wajdeczko
  2026-09-16 22:15 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michal Wajdeczko @ 2026-09-16 21:29 UTC (permalink / raw)
  To: intel-xe; +Cc: Michal Wajdeczko

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-21  7:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 21:29 [PATCH] drm/xe/pf: Move locking to xe_sriov_pf_reprovision_default Michal Wajdeczko
2026-09-16 22:15 ` ✓ CI.KUnit: success for " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox