From 0cab9f493f9b80d18330477ffbbead3ba15b68a5 Mon Sep 17 00:00:00 2001 From: Matthew Brost Date: Wed, 24 Apr 2024 22:47:47 -0700 Subject: [PATCH] drm/xe: Delete unused GuC submission_state.suspend BugLink: https://bugs.launchpad.net/bugs/2089884 [ Upstream commit 3f371a98deada9aee53d908c9aa53f6cdcb1300b ] GuC submission_state.suspend is unused, delete it. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425054747.1918811-1-matthew.brost@intel.com Stable-dep-of: 2d2be279f1ca ("drm/xe: fix UAF around queue destruction") Signed-off-by: Sasha Levin [koichiroden: adjusted context due to missing commit: 6240c2c43fd0 ("drm/xe: Document nested struct members according to guidelines")] Signed-off-by: Koichiro Den Signed-off-by: Roxana Nicolescu --- drivers/gpu/drm/xe/xe_guc_submit.c | 4 ---- drivers/gpu/drm/xe/xe_guc_types.h | 9 --------- 2 files changed, 13 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index d3cd0030b07a..475292119ce4 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -256,7 +256,6 @@ static void primelockdep(struct xe_guc *guc) fs_reclaim_acquire(GFP_KERNEL); mutex_lock(&guc->submission_state.lock); - might_lock(&guc->submission_state.suspend.lock); mutex_unlock(&guc->submission_state.lock); fs_reclaim_release(GFP_KERNEL); @@ -285,9 +284,6 @@ int xe_guc_submit_init(struct xe_guc *guc) xa_init(&guc->submission_state.exec_queue_lookup); ida_init(&guc->submission_state.guc_ids); - spin_lock_init(&guc->submission_state.suspend.lock); - guc->submission_state.suspend.context = dma_fence_context_alloc(1); - primelockdep(guc); err = drmm_add_action_or_reset(&xe->drm, guc_submit_fini, guc); diff --git a/drivers/gpu/drm/xe/xe_guc_types.h b/drivers/gpu/drm/xe/xe_guc_types.h index cd80802e8918..1421779434d2 100644 --- a/drivers/gpu/drm/xe/xe_guc_types.h +++ b/drivers/gpu/drm/xe/xe_guc_types.h @@ -43,15 +43,6 @@ struct xe_guc { atomic_t stopped; /** @lock: protects submission state */ struct mutex lock; - /** @suspend: suspend fence state */ - struct { - /** @lock: suspend fences lock */ - spinlock_t lock; - /** @context: suspend fences context */ - u64 context; - /** @seqno: suspend fences seqno */ - u32 seqno; - } suspend; #ifdef CONFIG_PROVE_LOCKING #define NUM_SUBMIT_WQ 256 /** @submit_wq_pool: submission ordered workqueues pool */