Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c87ddb6a authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Matt Wagantall
Browse files

genirq: fix handle_nested_irq for lazy disable



When lazy disabling is implemented and an interrupt is disabled the
genirq code ends up marking it as IRQ_DISABLED in the descriptor.
The interrupt stays enabled in the controller.  If the interrupt
fires after disabling, the flow handlers namely handle_level_irq and
handle_edge_irq mask the interrupt in the controller.

This is not the case with handle_nested_irq. The interrupt stays enabled in
the controller and if it were a level interrupt it keeps firing only to be
ignored by handle_nested_irq.

Update handle_nested_irq to mask such an interrupt.

Change-Id: I9412e0bbf796c12a13b29802fe95fd544592bff5
CRs-Fixed: 300931
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent d0033f02
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -305,6 +305,7 @@ void handle_nested_irq(unsigned int irq)
{
	struct irq_desc *desc = irq_to_desc(irq);
	struct irqaction *action;
	int mask_this_irq = 0;
	irqreturn_t action_ret;

	might_sleep();
@@ -317,6 +318,7 @@ void handle_nested_irq(unsigned int irq)
	action = desc->action;
	if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) {
		desc->istate |= IRQS_PENDING;
		mask_this_irq = 1;
		goto out_unlock;
	}

@@ -332,6 +334,11 @@ void handle_nested_irq(unsigned int irq)

out_unlock:
	raw_spin_unlock_irq(&desc->lock);
	if (unlikely(mask_this_irq)) {
		chip_bus_lock(desc);
		mask_irq(desc);
		chip_bus_sync_unlock(desc);
	}
}
EXPORT_SYMBOL_GPL(handle_nested_irq);