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

Rafael J. Wysocki
2009-02-03T22:45:15Z

On Tuesday 03 February 2009, Benjamin Herrenschmidt wrote:
> On Tue, 2009-02-03 at 22:53 +0100, Rafael J. Wysocki wrote:
>
> > That would change the ordering of ACPI method calls, which also is important
> > and prone to breaking, as I wrote in the original message.
>
> Ok, I'm not -that- familiar with ACPI, but I don't see where this
> ordering change you seem to fear is ... Ie, what gets re-ordered vs.
> what ?

(Newer) ACPI says that devices should be put into low power states (presumably
with the help of appropriate ACPI AML routines) before the _PTS method is
called. In turn, we're supposed to disable nonboot CPUs after calling _PTS.
There is analogous requirement for the _WAK method during resume.

Currently, the suspend code ordering follows these rules, but if we move
the putting of devices into low power states into the suspend_late part, they
will have to be done after _PTS and that is likely to break things (we've
already had this problem once and I have really bad memories related to it).

Thanks,
Rafael