public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: Brian King <brking@us.ibm.com>
Cc: Greg KH <greg@kroah.com>, Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, linuxppc64-dev@ozlabs.org,
	linux-pci@atrey.karlin.mff.cuni.cz, linux-arch@vger.kernel.org
Subject: Re: pci: Arch hook to determine config space size
Date: Tue, 1 Feb 2005 00:46:57 -0700	[thread overview]
Message-ID: <20050201074657.GA548@colo.lackof.org> (raw)
In-Reply-To: <41FE8994.4040802@us.ibm.com>

On Mon, Jan 31, 2005 at 01:40:04PM -0600, Brian King wrote:
> CC'ing the linux-pci mailing list...

thanks...

> > This patch adds an arch hook so
> > that individual archs can indicate if the underlying system supports
> > expanded config space accesses or not.

> >@@ -653,6 +653,8 @@ static int pci_cfg_space_size(struct pci
> > 			goto fail;
> > 	}
> > 
> >+	if (!pcibios_exp_cfg_space(dev))
> >+		goto fail;
> > 	if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL)
> > 		goto fail;

pci_read_config_dword lands in arch specific code.
See drivers/pci/access.c:PCI_OP_READ() macro.

I'm missing what pcibios_exp_cfg_space() does that can't be handled by
the bus_ops supplied by pci_scan_bus().

I would expect the pci_read_config_dword to fail for being out of bounds.
Is that wrong?
Or is bus_ops not feasible in this case because pcibios needs access
to pci_dev?

If it's feasible, maybe the right place to add this hook is to
pci_read_config_dword which is also handed the pci_dev. And add
another function pointer to bus_ops (which could be NULL) to check
chipset support for Expanded Config space before calling
pci_bus_read_config_dword. Thats cleaner than adding a hook
before each use of pci_read_config_dword.

hth,
grant

  reply	other threads:[~2005-02-01  7:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28 14:56 [PATCH 1/2] pci: Arch hook to determine config space size brking
2005-01-28 18:52 ` Christoph Hellwig
2005-01-29  4:06   ` Greg KH
2005-01-31 19:10     ` Brian King
2005-01-31 19:15       ` Greg KH
2005-01-31 19:29       ` Matthew Wilcox
2005-01-31 20:51         ` Arnd Bergmann
2005-01-31 21:35         ` Brian King
2005-01-31 21:56           ` Arnd Bergmann
2005-01-31 22:13             ` Greg KH
2005-01-31 22:43             ` Brian King
2005-02-01  3:15               ` Benjamin Herrenschmidt
2005-02-01  4:52                 ` Brian King
2005-02-01  4:57                   ` Benjamin Herrenschmidt
2005-02-02 10:05                     ` Arnd Bergmann
2005-02-03  0:23                       ` Benjamin Herrenschmidt
2005-02-01 12:32                   ` Matthew Wilcox
2005-02-01 20:16                     ` Brian King
2005-01-31 19:40       ` Brian King
2005-02-01  7:46         ` Grant Grundler [this message]
2005-02-01 15:23           ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2005-01-31 23:22 arndb

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=20050201074657.GA548@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=brking@us.ibm.com \
    --cc=greg@kroah.com \
    --cc=hch@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linuxppc64-dev@ozlabs.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