public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Li Shaohua <shaohua.li@intel.com>
Cc: ACPI-DEV <acpi-devel@lists.sourceforge.net>,
	lkml <linux-kernel@vger.kernel.org>,
	Len Brown <len.brown@intel.com>,
	greg@kroah.com, Pavel Machek <pavel@suse.cz>
Subject: Re: [ACPI] [Proposal]Another way to save/restore PCI config space for suspend/resume
Date: Tue, 26 Oct 2004 07:11:00 +0200	[thread overview]
Message-ID: <20041026051100.GA5844@wotan.suse.de> (raw)
In-Reply-To: <1098766257.8433.7.camel@sli10-desk.sh.intel.com>

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

This won't work very well for some cases. e.g. on AMD x86-64 the 
IOMMU is flushed by setting/clearing a bit in PCI config space.
AGP implementations work similar. You really don't want to track
all these flushes, it would be far too costly.

> 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

The driver could set a flag if it wants more.

> 2. No PCI bridge driver currently.

That could be fixed I guess? 

> 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.

In this case it would be IMHO better to have specialized suspend/resume
functions in the drivers for these oddball devices.

Most likely they will require some special handling anyways
(like special delays etc.) that can't be done by the generic code 

> 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.

I didn't get that one.

-Andi

  reply	other threads:[~2004-10-26  5:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-26  4:50 [Proposal]Another way to save/restore PCI config space for suspend/resume Li Shaohua
2004-10-26  5:11 ` Andi Kleen [this message]
2004-10-26  6:11   ` [ACPI] " Len Brown
2004-10-26  8:42     ` Arjan van de Ven
2004-10-26  9:06       ` Karol Kozimor
2004-10-26  9:57       ` Matthew Garrett
2004-10-26  9:09   ` Li Shaohua
2004-10-26  9:21 ` Pavel Machek
2004-10-27  0:50   ` [ACPI] " Li Shaohua
2004-10-27  1:32 ` [ACPI] " Hiroshi 2 Itoh
2004-10-27  1:55   ` Li Shaohua
2004-10-27  2:26     ` Hiroshi 2 Itoh
2004-10-27 20:14 ` Rajesh Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041026051100.GA5844@wotan.suse.de \
    --to=ak@suse.de \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=greg@kroah.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=shaohua.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox