genirq: Distangle edge handler entry
If the interrupt is disabled or has no action, then we should not call the poll check. Separate the checks. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
c4df606c40
commit
c3d7acd027
|
@ -540,19 +540,29 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
raw_spin_lock(&desc->lock);
|
raw_spin_lock(&desc->lock);
|
||||||
|
|
||||||
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
|
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're currently running this IRQ, or its disabled,
|
* If the handler is currently running, mark it pending,
|
||||||
* we shouldn't process the IRQ. Mark it pending, handle
|
* handle the necessary masking and go out
|
||||||
* the necessary masking and go out
|
|
||||||
*/
|
*/
|
||||||
if (unlikely(irqd_irq_disabled(&desc->irq_data) ||
|
if (unlikely(irqd_irq_inprogress(&desc->irq_data))) {
|
||||||
irqd_irq_inprogress(&desc->irq_data) || !desc->action)) {
|
|
||||||
if (!irq_check_poll(desc)) {
|
if (!irq_check_poll(desc)) {
|
||||||
desc->istate |= IRQS_PENDING;
|
desc->istate |= IRQS_PENDING;
|
||||||
mask_ack_irq(desc);
|
mask_ack_irq(desc);
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If its disabled or no action available then mask it and get
|
||||||
|
* out of here.
|
||||||
|
*/
|
||||||
|
if (irqd_irq_disabled(&desc->irq_data) || !desc->action) {
|
||||||
|
desc->istate |= IRQS_PENDING;
|
||||||
|
mask_ack_irq(desc);
|
||||||
|
goto out_unlock;
|
||||||
|
}
|
||||||
|
|
||||||
kstat_incr_irqs_this_cpu(irq, desc);
|
kstat_incr_irqs_this_cpu(irq, desc);
|
||||||
|
|
||||||
/* Start handling the irq */
|
/* Start handling the irq */
|
||||||
|
@ -601,18 +611,27 @@ void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
raw_spin_lock(&desc->lock);
|
raw_spin_lock(&desc->lock);
|
||||||
|
|
||||||
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
|
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're currently running this IRQ, or its disabled,
|
* If the handler is currently running, mark it pending,
|
||||||
* we shouldn't process the IRQ. Mark it pending, handle
|
* handle the necessary masking and go out
|
||||||
* the necessary masking and go out
|
|
||||||
*/
|
*/
|
||||||
if (unlikely(irqd_irq_disabled(&desc->irq_data) ||
|
if (unlikely(irqd_irq_inprogress(&desc->irq_data))) {
|
||||||
irqd_irq_inprogress(&desc->irq_data) || !desc->action)) {
|
|
||||||
if (!irq_check_poll(desc)) {
|
if (!irq_check_poll(desc)) {
|
||||||
desc->istate |= IRQS_PENDING;
|
desc->istate |= IRQS_PENDING;
|
||||||
goto out_eoi;
|
goto out_eoi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If its disabled or no action available then mask it and get
|
||||||
|
* out of here.
|
||||||
|
*/
|
||||||
|
if (irqd_irq_disabled(&desc->irq_data) || !desc->action) {
|
||||||
|
desc->istate |= IRQS_PENDING;
|
||||||
|
goto out_eoi;
|
||||||
|
}
|
||||||
|
|
||||||
kstat_incr_irqs_this_cpu(irq, desc);
|
kstat_incr_irqs_this_cpu(irq, desc);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in New Issue