mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	brking@us.ibm.com, Greg KH <greg@kroah.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] pci: Block config access during BIST
Date: Fri, 26 Nov 2004 09:00:08 +1100	[thread overview]
Message-ID: <16806.21992.295157.530799@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <1100954543.11822.8.camel@localhost.localdomain>

Alan Cox writes:

> That doesn't mean it is the right implementation. Most devices don't
> need
> this check so might as well have a fast path. You can at least reduce
> the cost by setting a flag on devices that potentially have this problem

But that's exactly what Brian's later patch does!  Did you actually
read the patch?  All that we are doing is testing one bit in the
struct pci_dev to see whether to do the actual access or not.  Or do
you want one bit to tell us whether to go and look at another bit to
see whether to do the access? :)

> (or a PCI_ANY PCI_ANY quirk for platforms with it globally)

How would you use a quirk to block config space accesses?  The two are
unrelated.

> >  - The device he's working on, which sometimes need to trigger a BIST
> > (built-in self test). During this operation, the device stops responding
> > on the PCI bus, which can be sort-of fatal if anything (userland playing
> > with /sys/bus/pci/* for example) touches the config space.
> 
> That will be fun given some laptop SMM touches config space.

Well, I can see that that would limit your power management options,
but fortunately we don't have SMM on the machines where we need this
config access blocking.

> Some of the Intel CPU's are very bad at lock handling so it is an issue.

There is no extra locking introduced by Brian's patch.  Config
accesses were already taking the pci_lock and that hasn't changed.

> I dislike the "Hey it sucks, lets make it suck more" approach when it
> seems easy to do the job well.

Perhaps you could expand on what you mean by "do the job well"?

Paul.

  parent reply	other threads:[~2004-11-26 23:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19 20:23 brking
2004-11-19 21:32 ` Greg KH
2004-11-19 22:25   ` Brian King
2004-11-19 22:46     ` Benjamin Herrenschmidt
2004-11-19 23:22       ` Brian King
2004-11-20  0:23         ` Benjamin Herrenschmidt
2004-11-19 22:45   ` Benjamin Herrenschmidt
2004-11-20  2:27 ` Alan Cox
2004-11-20  7:09   ` Benjamin Herrenschmidt
2004-11-20 12:42     ` Alan Cox
2004-11-20 22:32       ` Benjamin Herrenschmidt
2004-11-20 23:38       ` Brian King
2004-11-21  0:06         ` Benjamin Herrenschmidt
2004-11-21  1:55           ` Brian King
2004-11-21  7:03             ` Benjamin Herrenschmidt
2004-11-21 17:22               ` Brian King
2004-12-03 15:26                 ` Brian King
2004-11-24 11:49         ` Alan Cox
2004-11-25 22:00       ` Paul Mackerras [this message]
2004-11-25 21:11         ` Alan Cox

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=16806.21992.295157.530799@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=brking@us.ibm.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.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®