mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: abelay@MIT.EDU
To: "Brown, Len" <len.brown@intel.com>,
	Arjan van de Ven <arjan@infradead.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	"Yu, Luming" <luming.yu@intel.com>, Andrew Morton <akpm@osdl.org>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCH] reverse pci config space restore order
Date: Tue, 25 Apr 2006 19:59:43 -0400	[thread overview]
Message-ID: <20060425195943.7a6apx4ci65ticos@webmail.mit.edu> (raw)
In-Reply-To: <CFF307C98FEABE47A452B27C06B85BB6466300@hdsmsx411.amr.corp.intel.com>

Quoting "Brown, Len" <len.brown@intel.com>:

>
>> On Tue, 2006-04-25 at 11:48 +0100, Matthew Garrett wrote:
>>> On Tue, Apr 25, 2006 at 02:50:57PM +0800, Yu, Luming wrote:
>>>
>>> > -	for (i = 0; i < 16; i++)
>>> > +	for (i = 15; i >= 0 ; i--)
>>>
>>> We certainly need to do /something/ here, but I'm not sure
>>> this is it.
>>> Adam Belay has code to limit PCI state restoration to the
>>> PCI-specified
>>> registers, with the idea being that individual drivers fix things up
>>> properly. While this has the obvious drawback that almost every PCI
>>> driver in the tree would then need fixing up, it's also probably the
>>> right thing.
>>
>> it has a second drawback: it assumes all devices HAVE a driver, which
>> isn't normally the case...
>
> Adam mentioned earlier, and I agree, that it is probably a bad
> idea for this code to blindly scribble on the BIST field at i=3.
> Probably we should clear that field before restoring it.
>
> Re: this patch
> I think that this patch is likely a positive forward step.
> It seems logical to restore the BARs before the CMD/STATUS in general,
> nothing specific to the ICH here.
>
> But yes, this is a helper routine and devices where it hurts
> instead of helps should have their own routine.  Complex devices
> need to handle the device-specific config space state above these
> 1st 16 locations anyway.

Right, and because we only restore the first 0x40 or so registers (they're all
standard), I don't think implementing pci_save/restore_state() properly 
is going
to break much at all.  I'm planning to merge these changes with -mm, so
hopefully it won't be difficult to tell. :)

Re: devices without drivers

We can certainly call a generic save and restore function when there isn't a
driver available, but beyond handling standard registers mentioned in 
the spec,
if important hardware context is lost there's really no way around it.

-Adam


  reply	other threads:[~2006-04-26  0:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25 18:22 Brown, Len
2006-04-25 23:59 ` abelay [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-25  6:50 Yu, Luming
2006-04-25 10:48 ` Matthew Garrett
2006-04-25 10:51   ` Arjan van de Ven
2006-04-25 11:01     ` Matthew Garrett

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=20060425195943.7a6apx4ci65ticos@webmail.mit.edu \
    --to=abelay@mit.edu \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luming.yu@intel.com \
    --cc=mjg59@srcf.ucam.org \
    /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

all inboxes | Powered by JetHome®