Re: [Proposal]Another way to save/restore PCI config space for suspend/resume

From: Rajesh Shah
Date: Wed Oct 27 2004 - 15:29:18 EST


On Tue, Oct 26, 2004 at 12:50:57PM +0800, Li Shaohua wrote:
> Hi,
> We suffer from PCI config space issue for a long time, which causes many
> system can't correctly resume. Current Linux mechanism isn't sufficient.
> Here is a another idea:
> Record all PCI writes in Linux kernel, and redo all the write after
> resume in order. The idea assumes Firmware will restore all PCI config
> space to the boot time state, which is true at least for IA32.
>
A large percentage of them may be irrelevant with respect to
suspend/resume (e.g. pci device tree and resource scan...). Apart
from the performance problems, generic code doing device specific
config accesses may have correctness problems. For example, you
will not be able to capture/replay config cycles or other device
specific initialization (e.g. using memory mapped IO) that BIOS may
have done before boot. This may be required for correct access to
device specific areas. The same thing is true about device specific
config accesses that may have been done by the corresponding
driver after boot. Without device specific knowledge, we may see
unpredictable behavior and non-repeatable and hard to debug problems.

I don't see how generic code can do the right thing for device
specific accesses. Devices like p2p bridges that have standard
definitions can be handled separately.

Rajesh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/