Re: Reworking suspend-resume sequence (was: Re: PCI PM: Restore standard config registers of all devices early)

Ingo Molnar
2009-02-03T20:05:39Z

* Ingo Molnar <mingo@elte.hu> wrote:

> - the screaming-irq observation i had - do you consider that valid?:
>
> >> [ In theory this also solves screaming level-triggered irqs that
> >> advertise themselves as edge-triggered [due to firmware/BIOS bug -
> >> these do happen] and then keep spamming the system. ]
>
> I wanted to have a pretty much interchangeable flow method between edge
> and level triggered - so that the BIOS cannot screw us by enumerating an
> irq as edge-triggered while it's level-triggered.
>
> Especially for legacy x86 irqs in the low <16 range the trigger mode can
> be influenced by chipset settings and might not always be what we think
> it is.

For apic and MSI based methods that's not a big issue: the trigger mode is
explicitly set by us, so if there's a mismatch it's a kernel bug.

And even for legacy ISA i8259a.c it should be fine after all, as we
initialize it via:

set_irq_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq,

Which is a screaming-safe sequence. (and the x86 i8259 PIC does not lose
edges.)

That still leaves other architectures ... but i think the argument is a lot
weaker than i thought it to be.

Could you send a Signed-off-by so that i can queue it up and test it a bit?
If it does not blow up on x86 in practice then we should be fine, and it
avoids the MSI ->mask() stupidity as well.

Ingo