From 43b7c2a243fd9456afb870aa27a3888bbf1f90fb Mon Sep 17 00:00:00 2001 From: Abhijeet Dharmapurikar Date: Sun, 19 Dec 2010 16:23:48 -0800 Subject: [PATCH] genirq: pm: Fix the enable ordering in resume In suspend interrupts are disabled from 0 to NR_IRQ, in resume interrupts should be enabled in reverse order. Enabling parent or summary interrupts before enabling child interrupts causes the handler of the child interrupt to run even before it is enabled. Usually the genirq handler does the correct thing of masking the interrupt and additionally marking the interrupt IRQ_PENDING if its an edge triggered interrupt. However the nested handler (handle_nested_irq()) simply ignores the interrupt causing a loss of it. Not calling the action of an interrupt, especially if it marked wakeup, causes the system to incorrectly go back to suspend immediately. Change-Id: Ica30c10a975a4a7b41b97b4f21250dac80335b2b Signed-off-by: Abhijeet Dharmapurikar --- kernel/irq/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c index 9dfd0703..7d49303c 100644 --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c @@ -51,7 +51,7 @@ void resume_device_irqs(void) struct irq_desc *desc; int irq; - for_each_irq_desc(irq, desc) { + for_each_irq_desc_reverse(irq, desc) { unsigned long flags; if (!(desc->status & IRQ_SUSPENDED))