Re: PCI PM: Restore standard config registers of all devices early

Benjamin Herrenschmidt
2009-02-02T21:19:46Z

> I suspect that late-suspend/early-resume is just exactly the same. It's a
> boot, after all.

I agree. We know we have turned off all other CPUs, we can't race,
etc...

> Just let ACPI do its odd things, despite the fact that
> interrupts are disabled. The fact that doing them while the system is
> _running_ is invalid doesn't necessarily mean that it is invalid under
> bootup or suspend/resume.
>
> We might even make it possible to have timers going, if we end up saying
> "we'll mask all hardware interrupts _except_ for the timer". I'm not sure
> that is necessarily something we can do portably, though..

Dunno. I can do it for powerpc easily enough but it's hard to tell for
others. The problem with timers running is that it means a slight change
of semantics for drivers in the sense that suspend_late now -might- be
interrupted by some request hitting the driver from interrupt time ...
ie, we had the property that suspend_late was not going to bother with
any exclusion vs. normal processing code path, but with timers on,
that's no longer the case...

I prefer the hack to get ACPI working early. Sounds saner to me in a
wicked way :-) And being able to restore the device via ACPI before
touching its config space -at-all- in the kernel side might end up
making things more robust for us .. who knows what those AML do tho...

BTW. Somebody happens to know what Windows does in that area ? Does it
restore config space ?

Cheers,
Ben.