genirq: explicitly mask a freed irq
When an interrupt is freed, the shutdown or the disable callback is called for that interrupt. These calls might not be implemented or even if they were, might not mask the interrupt. Explicitly mask the interrupt when it is freed. If not masked, the interrupt could trigger, set the pending bit in the irq controller and cause unnecessary wakeup or exits from idle power collapse. Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Conflicts: kernel/irq/manage.c
This commit is contained in:
committed by
Rohit Vaswani
parent
18f1fe25ad
commit
aeef1962d0
@@ -1237,9 +1237,16 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
|
||||
#endif
|
||||
|
||||
/* If this was the last handler, shut down the IRQ line: */
|
||||
if (!desc->action)
|
||||
if (!desc->action) {
|
||||
irq_shutdown(desc);
|
||||
|
||||
/* Explicitly mask the interrupt */
|
||||
if (desc->irq_data.chip->irq_mask)
|
||||
desc->irq_data.chip->irq_mask(&desc->irq_data);
|
||||
else if (desc->irq_data.chip->irq_mask_ack)
|
||||
desc->irq_data.chip->irq_mask_ack(&desc->irq_data);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* make sure affinity_hint is cleaned up */
|
||||
if (WARN_ON_ONCE(desc->affinity_hint))
|
||||
|
||||
Reference in New Issue
Block a user