mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
drm/xe: Taint TLB invalidation seqno lock with GFP_KERNEL
Taint TLB invalidation seqno lock with GFP_KERNEL as TLB invalidations can be in the path of reclaim (e.g., MMU notifiers). Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> Tested-by: Stuart Summers <stuart.summers@intel.com> Link: https://patch.msgid.link/20260116221731.868657-7-matthew.brost@intel.com
This commit is contained in:
parent
a3866ce7b1
commit
8d7a9f801e
|
|
@ -111,6 +111,16 @@ static void tlb_inval_fini(struct drm_device *drm, void *arg)
|
|||
xe_tlb_inval_reset(tlb_inval);
|
||||
}
|
||||
|
||||
static void primelockdep(struct xe_tlb_inval *tlb_inval)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_LOCKDEP))
|
||||
return;
|
||||
|
||||
fs_reclaim_acquire(GFP_KERNEL);
|
||||
might_lock(&tlb_inval->seqno_lock);
|
||||
fs_reclaim_release(GFP_KERNEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_gt_tlb_inval_init - Initialize TLB invalidation state
|
||||
* @gt: GT structure
|
||||
|
|
@ -137,6 +147,8 @@ int xe_gt_tlb_inval_init_early(struct xe_gt *gt)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
primelockdep(tlb_inval);
|
||||
|
||||
tlb_inval->job_wq = drmm_alloc_ordered_workqueue(&xe->drm,
|
||||
"gt-tbl-inval-job-wq",
|
||||
WQ_MEM_RECLAIM);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user