* Re: [ACPI] Re: [Proposal]Another way to save/restore PCI config space for suspend/resume
[not found] ` <fa.ivj042g.g5qnoo@ifi.uio.no>
@ 2004-10-27 6:30 ` Len Brown
2004-10-27 9:57 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Len Brown @ 2004-10-27 6:30 UTC (permalink / raw)
To: Li Shaohua; +Cc: Pavel Machek, ACPI-DEV, lkml, greg
Li Shaohua wrote:
> On Tue, 2004-10-26 at 17:21, Pavel Machek wrote:
>>>Here is a another idea:
>>>Record all PCI writes in Linux kernel...
>>
>>That looks extremely ugly to me. If you want to do something special
>>in resume function, just do it there. It will probably share a lot of
>>code with your init function, anyway.
>
> How can you handle devices without driver? And how to save/restore
> config space for special devices, such as LPC bridge and host bridge?
Say that writing the missing drivers is the only workable solution.
Does anybody have an estimate of how many there are and how big
a task that would be?
-Len
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [ACPI] Re: [Proposal]Another way to save/restore PCI config space for suspend/resume
2004-10-27 6:30 ` [ACPI] Re: [Proposal]Another way to save/restore PCI config space for suspend/resume Len Brown
@ 2004-10-27 9:57 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-10-27 9:57 UTC (permalink / raw)
To: Len Brown; +Cc: Li Shaohua, Pavel Machek, ACPI-DEV, Linux Kernel list, Greg KH
On Wed, 2004-10-27 at 02:30 -0400, Len Brown wrote:
> Li Shaohua wrote:
> > On Tue, 2004-10-26 at 17:21, Pavel Machek wrote:
>
> >>>Here is a another idea:
> >>>Record all PCI writes in Linux kernel...
> >>
> >>That looks extremely ugly to me. If you want to do something special
> >>in resume function, just do it there. It will probably share a lot of
> >>code with your init function, anyway.
> >
> > How can you handle devices without driver? And how to save/restore
> > config space for special devices, such as LPC bridge and host bridge?
>
> Say that writing the missing drivers is the only workable solution.
> Does anybody have an estimate of how many there are and how big
> a task that would be?
This has been discussed a bit on linux-pm (on osdl lists, it's a new
list to discuss PM specific matters). I tend to think the core should
know at least a few "standard" things like P2P bridges, by simply
saving/restoring a bigger chunk of config space. We also need to fix the
current restore code I suppose, so that it disables IO & MEM, then
restore all registers, then re-enable those 2 ones...
I don't want to cross-post between lists, but people are welcome to join
linux-pm to talk about implementation issues related to power
management, including the changes we are trying to define to the various
driver callbacks.
Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Proposal]Another way to save/restore PCI config space for suspend/resume
@ 2004-10-26 4:50 Li Shaohua
2004-10-26 9:21 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Li Shaohua @ 2004-10-26 4:50 UTC (permalink / raw)
To: ACPI-DEV, lkml; +Cc: Len Brown, greg, Pavel Machek
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.
Reason:
1. Current PCI save/restore routines only cover first 64 bytes
2. No PCI bridge driver currently.
3. Some special devices can't or are difficult to save/restore config
space with current model. Such as PCI link device, it's a sysdev, but
its resume code can't be invoked with irq disabled.
4. ACPI possibly changes special devices' config space, such as host
bridge or LPC bridge. The special devices generally are vender specific,
and possibly will not have a driver forever.
Possibly we must consider other factors:
1.tracking writes alone will not be enough. Some PCI devices may have
restrictions such as something has to be written after it is read and
the like. Still we should be able to do this if we can trace all pci
reads and writes and repeat it at restore.
2. For support hotplug, add a callback for hotplug PCI remove. When a
device is removed, all records about it are removed.
What's your opinions?
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Proposal]Another way to save/restore PCI config space for suspend/resume
2004-10-26 4:50 Li Shaohua
@ 2004-10-26 9:21 ` Pavel Machek
2004-10-27 0:50 ` [ACPI] " Li Shaohua
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2004-10-26 9:21 UTC (permalink / raw)
To: Li Shaohua; +Cc: ACPI-DEV, lkml, Len Brown, greg
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.
That looks extremely ugly to me. If you want to do something special
in resume function, just do it there. It will probably share a lot of
code with your init function, anyway.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ACPI] Re: [Proposal]Another way to save/restore PCI config space for suspend/resume
2004-10-26 9:21 ` Pavel Machek
@ 2004-10-27 0:50 ` Li Shaohua
0 siblings, 0 replies; 3+ messages in thread
From: Li Shaohua @ 2004-10-27 0:50 UTC (permalink / raw)
To: Pavel Machek; +Cc: ACPI-DEV, lkml, Len Brown, greg
On Tue, 2004-10-26 at 17:21, Pavel Machek 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.
>
> That looks extremely ugly to me. If you want to do something special
> in resume function, just do it there. It will probably share a lot of
> code with your init function, anyway.
How can you handle devices without driver? And how to save/restore
config space for special devices, such as LPC bridge and host bridge?
-Shaohua
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-27 10:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fa.fvou17m.1f5oa9u@ifi.uio.no>
[not found] ` <fa.ivj042g.g5qnoo@ifi.uio.no>
2004-10-27 6:30 ` [ACPI] Re: [Proposal]Another way to save/restore PCI config space for suspend/resume Len Brown
2004-10-27 9:57 ` Benjamin Herrenschmidt
2004-10-26 4:50 Li Shaohua
2004-10-26 9:21 ` Pavel Machek
2004-10-27 0:50 ` [ACPI] " Li Shaohua
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox