Re: irq mask swapping during suspend/resume

From: Thomas Gleixner
Date: Mon Sep 29 2014 - 18:43:12 EST

On Sun, 21 Sep 2014, Rafael J. Wysocki wrote:
> So I'd rather put that into the struct wakeup_source pointed to by
> the wakeup pointer in struct dev_pm_info. That would give us a mapping
> between wakeup source objects and wakeup interrupts and which would make
> a fair amount of sense in my view.
> Then, we could simply walk the list of wakeup source objects before
> suspend_device_irqs() and call enable_irq_wake() etc. for all of the
> interrupts in question without drivers having to worry about that.
> We also could save the current IRQ type for them at that point and
> restore it during resume.
> Of course, that would require some changes to wakeup_source_create()
> and friends, but is probably worth doing.
> Still, before we start making those changes, here's a bunch of questions
> to answer:
> (1) Say a wakeup interrupt is shared between two drivers and one of them
> asks for a different "IRQ type for sleep" than the other one. How are
> we going to resolve such conflicts?

Not at all. There is no solution to that problem other than aborting
and yelling about it.

> (2) Can platforms place restrictions on the IRQ type to be used with a given
> line? If so, how do we handle situations in which the requested
> "IRQ type for sleep" is different from what the given line can use?
> Do we need to resolve that at the struct wakeup_source creation time or
> can we do that later (during suspend?) and how?

If the type request fails, bail out and be done with it. Same as #1


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