Re: [PATCH] genirq: do not disable IRQ_WAKEUP marked irqs onsuspend

From: Thomas Gleixner
Date: Fri Jun 12 2009 - 15:53:04 EST

On Fri, 12 Jun 2009, Kevin Hilman wrote:
> Only difference is I did the checking outside of the lock, which is
> probably wrong. In any case, you'll be interested in the thread that
> follows.

Hmm, darn. That means that on hardware which has trouble with the
delayed disable and therefor uses it's own chip->disable_irq() method
the suspend logic is wreckaged.

But there is always a way to get broken hardware tamed. :)

suspend does:
status |= IRQ_SUSPENDED;

resume does:
status &= ~IRQ_SUSPENDED;


- set_irq_handler(handle_level_irq);
+ set_irq_handler(my_own_handler);

+ if (!(status & IRQ_SUSPENDED)) {
+ handle_level_irq();
+ } else {
+ mask_at_hardware_level();
+ status |= IRQ_PENDING;
+ save_important_information();
+ }

+ if (!(status & IRQ_SUSPENDED))

+ if (important_information_has_been_saved)
+ replay_what_happened();

Ugly, but that might work somehow. Not sure about the replay part, but
that can be deferred via some more hackery as well :)

Raphael, these delayed disable and the chip->irq_disable() override
implications vs. suspend really need to be documented. The current
comment of suspend_device_irqs() is bogus:

* During system-wide suspend or hibernation device interrupts need to be
* disabled at the chip level and this function is provided for this purpose.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at