Skip to contentSkip to conversation

genirq: do not disable IRQ_WAKEUP marked irqs on suspend

PATCH New Thomas Gleixner 1 participant 1 message Jun 12, 2009 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genirq: do not disable IRQ_WAKEUP marked irqs on suspend

commit 0a0c5168df (PM: Introduce functions for suspending and resuming device interrupts) iterates through all interrupts and disables them on the hardware level. Some architectures have functionality implemented to mark an interrupt source as wakeup source for suspend, but the new power management code disables them unconditionally which breaks the resume on interrupt functionality.

The wakeup interrupts are marked in the status with the IRQ_WAKEUP bit. Skip the disablement for those interrupts which have the IRQ_WAKEUP bit set.

kernel/irq/pm.c +2 -1
index 638d8be..bce6afd 100644
@@ -29,7 +29,8 @@ void suspend_device_irqs(void)
 		unsigned long flags;
 
 		spin_lock_irqsave(&desc->lock, flags);
-		__disable_irq(desc, irq, true);
+		if (!(desc->status & IRQ_WAKEUP))
+			__disable_irq(desc, irq, true);
 		spin_unlock_irqrestore(&desc->lock, flags);
 	}