|
@@ -49,7 +49,7 @@ static void irq_enable(struct intel_engine_cs *engine)
|
|
|
* we still need to force the barrier before reading the seqno,
|
|
|
* just in case.
|
|
|
*/
|
|
|
- engine->irq_posted = true;
|
|
|
+ engine->breadcrumbs.irq_posted = true;
|
|
|
|
|
|
spin_lock_irq(&engine->i915->irq_lock);
|
|
|
engine->irq_enable(engine);
|
|
@@ -62,7 +62,7 @@ static void irq_disable(struct intel_engine_cs *engine)
|
|
|
engine->irq_disable(engine);
|
|
|
spin_unlock_irq(&engine->i915->irq_lock);
|
|
|
|
|
|
- engine->irq_posted = false;
|
|
|
+ engine->breadcrumbs.irq_posted = false;
|
|
|
}
|
|
|
|
|
|
static void __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b)
|
|
@@ -195,7 +195,7 @@ static bool __intel_engine_add_wait(struct intel_engine_cs *engine,
|
|
|
}
|
|
|
rb_link_node(&wait->node, parent, p);
|
|
|
rb_insert_color(&wait->node, &b->waiters);
|
|
|
- GEM_BUG_ON(!first && !b->tasklet);
|
|
|
+ GEM_BUG_ON(!first && !b->irq_seqno_bh);
|
|
|
|
|
|
if (completed) {
|
|
|
struct rb_node *next = rb_next(completed);
|
|
@@ -204,7 +204,7 @@ static bool __intel_engine_add_wait(struct intel_engine_cs *engine,
|
|
|
if (next && next != &wait->node) {
|
|
|
GEM_BUG_ON(first);
|
|
|
b->first_wait = to_wait(next);
|
|
|
- smp_store_mb(b->tasklet, b->first_wait->tsk);
|
|
|
+ smp_store_mb(b->irq_seqno_bh, b->first_wait->tsk);
|
|
|
/* As there is a delay between reading the current
|
|
|
* seqno, processing the completed tasks and selecting
|
|
|
* the next waiter, we may have missed the interrupt
|
|
@@ -216,7 +216,7 @@ static bool __intel_engine_add_wait(struct intel_engine_cs *engine,
|
|
|
* in case the seqno passed.
|
|
|
*/
|
|
|
__intel_breadcrumbs_enable_irq(b);
|
|
|
- if (READ_ONCE(engine->irq_posted))
|
|
|
+ if (READ_ONCE(b->irq_posted))
|
|
|
wake_up_process(to_wait(next)->tsk);
|
|
|
}
|
|
|
|
|
@@ -230,18 +230,18 @@ static bool __intel_engine_add_wait(struct intel_engine_cs *engine,
|
|
|
if (first) {
|
|
|
GEM_BUG_ON(rb_first(&b->waiters) != &wait->node);
|
|
|
b->first_wait = wait;
|
|
|
- smp_store_mb(b->tasklet, wait->tsk);
|
|
|
+ smp_store_mb(b->irq_seqno_bh, wait->tsk);
|
|
|
/* After assigning ourselves as the new bottom-half, we must
|
|
|
* perform a cursory check to prevent a missed interrupt.
|
|
|
* Either we miss the interrupt whilst programming the hardware,
|
|
|
* or if there was a previous waiter (for a later seqno) they
|
|
|
* may be woken instead of us (due to the inherent race
|
|
|
- * in the unlocked read of b->tasklet in the irq handler) and
|
|
|
- * so we miss the wake up.
|
|
|
+ * in the unlocked read of b->irq_seqno_bh in the irq handler)
|
|
|
+ * and so we miss the wake up.
|
|
|
*/
|
|
|
__intel_breadcrumbs_enable_irq(b);
|
|
|
}
|
|
|
- GEM_BUG_ON(!b->tasklet);
|
|
|
+ GEM_BUG_ON(!b->irq_seqno_bh);
|
|
|
GEM_BUG_ON(!b->first_wait);
|
|
|
GEM_BUG_ON(rb_first(&b->waiters) != &b->first_wait->node);
|
|
|
|
|
@@ -301,7 +301,7 @@ void intel_engine_remove_wait(struct intel_engine_cs *engine,
|
|
|
const int priority = wakeup_priority(b, wait->tsk);
|
|
|
struct rb_node *next;
|
|
|
|
|
|
- GEM_BUG_ON(b->tasklet != wait->tsk);
|
|
|
+ GEM_BUG_ON(b->irq_seqno_bh != wait->tsk);
|
|
|
|
|
|
/* We are the current bottom-half. Find the next candidate,
|
|
|
* the first waiter in the queue on the remaining oldest
|
|
@@ -344,13 +344,13 @@ void intel_engine_remove_wait(struct intel_engine_cs *engine,
|
|
|
* exception rather than a seqno completion.
|
|
|
*/
|
|
|
b->first_wait = to_wait(next);
|
|
|
- smp_store_mb(b->tasklet, b->first_wait->tsk);
|
|
|
+ smp_store_mb(b->irq_seqno_bh, b->first_wait->tsk);
|
|
|
if (b->first_wait->seqno != wait->seqno)
|
|
|
__intel_breadcrumbs_enable_irq(b);
|
|
|
- wake_up_process(b->tasklet);
|
|
|
+ wake_up_process(b->irq_seqno_bh);
|
|
|
} else {
|
|
|
b->first_wait = NULL;
|
|
|
- WRITE_ONCE(b->tasklet, NULL);
|
|
|
+ WRITE_ONCE(b->irq_seqno_bh, NULL);
|
|
|
__intel_breadcrumbs_disable_irq(b);
|
|
|
}
|
|
|
} else {
|
|
@@ -364,7 +364,7 @@ out_unlock:
|
|
|
GEM_BUG_ON(b->first_wait == wait);
|
|
|
GEM_BUG_ON(rb_first(&b->waiters) !=
|
|
|
(b->first_wait ? &b->first_wait->node : NULL));
|
|
|
- GEM_BUG_ON(!b->tasklet ^ RB_EMPTY_ROOT(&b->waiters));
|
|
|
+ GEM_BUG_ON(!b->irq_seqno_bh ^ RB_EMPTY_ROOT(&b->waiters));
|
|
|
spin_unlock(&b->lock);
|
|
|
}
|
|
|
|