Re: [RFC][PATCH 1/4] PM: Rework handling of interrupts during suspend-resume (rev. 4)

From: Linus Torvalds
Date: Mon Mar 02 2009 - 18:34:30 EST




On Mon, 2 Mar 2009, Arve Hjønnevåg wrote:
>
> > enable_irq() clears IRQ_SUSPENDED.  This has already been discussed btw.
>
> I'm if I missed that discussion, but enable_irq cannot know who is
> calling it and therefore cannot know if IRQ_SUSPENDED should be
> cleared.

Sure it can.

If IRQ_SUSPENDED is not set, then clearing it is a no-op, so that's fine.

If IRQ_SUSPENDED _is_ set, then that means that we're after the
suspend_late() sequence and before the resume_early() sequence, and no
device driver is possibly called in between, so they'd sure better not be
doing anything that does an enable_irq().

IOW, we know who the caller is, simply because there can be no other valid
caller!

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/