Re: [PATCH 2/2] Fix console handling during suspend/resume

Benjamin Herrenschmidt
2006-06-22T06:28:15Z

> Nope ... setpci may have been used to tweak things at runtime, and
> in ways that affect system correctness. Admittedly that's not the
> most common scenario, but I've had to use it on some systems.
>
> So saving PCI config space "late" is a far better approach. It's
> hardware state that _can_ be snapshotted, with care.

Yes, well, maybe but then you have to define what "late" is ... my point
boils down to basically: if you care about the changes that can be done
to the state, then you don't want to lose them between save_state and
suspend. If you don't, you can snapshot at any time ... an early
save_state might be a _convenience_ for some drivers but I also think it
will cause confusion and breakage due to the reasons I've explained.

Thus I maintain that save_state and suspend have to be one and only
thing. One we have that, well, doing the pci config space saving there
is easy and ... it's what we already do ! funny heh ? :)

Ben.