diff mbox series

[2/2] drm/i915: Drop the IRQ-off asserts

Message ID 20190926105644.16703-3-bigeasy@linutronix.de (mailing list archive)
State New, archived
Headers show
Series drm/i915: Acquire locks with interrupts disabled | expand

Commit Message

Sebastian Andrzej Siewior Sept. 26, 2019, 10:56 a.m. UTC
The lockdep_assert_irqs_disabled() check is needless. The previous
lockdep_assert_held() check ensures that the lock is acquired and while
the lock is acquired lockdep also prints a warning if the interrupts are
not disabled if they have to be.
These IRQ-off asserts trigger on PREEMPT_RT because the locks become
sleeping locks and do not really disable interrupts.

Remove lockdep_assert_irqs_disabled().

Reported-by: Clark Williams <williams@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Chris Wilson Sept. 26, 2019, 5:11 p.m. UTC | #1
Quoting Sebastian Andrzej Siewior (2019-09-26 11:56:44)
> The lockdep_assert_irqs_disabled() check is needless. The previous
> lockdep_assert_held() check ensures that the lock is acquired and while
> the lock is acquired lockdep also prints a warning if the interrupts are
> not disabled if they have to be.
> These IRQ-off asserts trigger on PREEMPT_RT because the locks become
> sleeping locks and do not really disable interrupts.

The intent was to document the entry points in were to be common
dma-fence functions where irqs were expected to be off. Similarly for
breadcrumbs to indicate that they were inner functions dealing with
irq-sensitive locks that the caller had to disable irqs for. lockdep is
not the clearest when it comes to explaining irq-inversions.

> Remove lockdep_assert_irqs_disabled().
> 
> Reported-by: Clark Williams <williams@redhat.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Given the context though, they are moot.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
index f750375056de4..55317081d48b0 100644
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -120,7 +120,6 @@  __dma_fence_signal__notify(struct dma_fence *fence,
 	struct dma_fence_cb *cur, *tmp;
 
 	lockdep_assert_held(fence->lock);
-	lockdep_assert_irqs_disabled();
 
 	list_for_each_entry_safe(cur, tmp, list, node) {
 		INIT_LIST_HEAD(&cur->node);
@@ -269,7 +268,6 @@  void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine)
 bool i915_request_enable_breadcrumb(struct i915_request *rq)
 {
 	lockdep_assert_held(&rq->lock);
-	lockdep_assert_irqs_disabled();
 
 	if (test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
 		struct intel_breadcrumbs *b = &rq->engine->breadcrumbs;
@@ -319,7 +317,6 @@  void i915_request_cancel_breadcrumb(struct i915_request *rq)
 	struct intel_breadcrumbs *b = &rq->engine->breadcrumbs;
 
 	lockdep_assert_held(&rq->lock);
-	lockdep_assert_irqs_disabled();
 
 	/*
 	 * We must wait for b->irq_lock so that we know the interrupt handler