diff options
author | 2020-07-09 10:19:44 +0000 | |
---|---|---|
committer | 2020-07-09 10:19:44 +0000 | |
commit | fb1690794631d048622e033da5b60b54602332be (patch) | |
tree | 1929e0e67283242ee4dcd794f87a8ee7acf9546c /sys | |
parent | drm/amd/display: Fix ineffective setting of max bpc property (diff) | |
download | wireguard-openbsd-fb1690794631d048622e033da5b60b54602332be.tar.xz wireguard-openbsd-fb1690794631d048622e033da5b60b54602332be.zip |
drm/i915/gt: Mark timeline->cacheline as destroyed after rcu grace period
From Chris Wilson
18ad3ad0b9b35370182ae4a7dbd89a77168df19e in linux 5.7.y/5.7.8
8e87e0139aff59c5961347ab1ef06814f092c439 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915/gt/intel_timeline.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915/gt/intel_timeline.c b/sys/dev/pci/drm/i915/gt/intel_timeline.c index 2fa61904404..d0cc2056f5b 100644 --- a/sys/dev/pci/drm/i915/gt/intel_timeline.c +++ b/sys/dev/pci/drm/i915/gt/intel_timeline.c @@ -119,6 +119,15 @@ static void __idle_hwsp_free(struct intel_timeline_hwsp *hwsp, int cacheline) spin_unlock_irqrestore(>->hwsp_lock, flags); } +static void __rcu_cacheline_free(struct rcu_head *rcu) +{ + struct intel_timeline_cacheline *cl = + container_of(rcu, typeof(*cl), rcu); + + i915_active_fini(&cl->active); + kfree(cl); +} + static void __idle_cacheline_free(struct intel_timeline_cacheline *cl) { GEM_BUG_ON(!i915_active_is_idle(&cl->active)); @@ -127,8 +136,7 @@ static void __idle_cacheline_free(struct intel_timeline_cacheline *cl) i915_vma_put(cl->hwsp->vma); __idle_hwsp_free(cl->hwsp, ptr_unmask_bits(cl->vaddr, CACHELINE_BITS)); - i915_active_fini(&cl->active); - kfree_rcu(cl, rcu); + call_rcu(&cl->rcu, __rcu_cacheline_free); } __i915_active_call |