linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, thunderbird2k@gmail.com,
	David Miller <davem@davemloft.net>,
	John.Linn@xilinx.com
Subject: Re: Musings on PCI busses
Date: Wed, 20 May 2009 16:28:18 -0600	[thread overview]
Message-ID: <fa686aa40905201528u65fc611fr64e9ebd296278835@mail.gmail.com> (raw)
In-Reply-To: <1242856782.16901.203.camel@pasglop>

On Wed, May 20, 2009 at 3:59 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2009-05-20 at 14:06 -0600, Grant Likely wrote:
>> On Wed, May 20, 2009 at 1:24 PM, David Miller <davem@davemloft.net> wrot=
e:
>> >> What do you mean by fully resolve ? IE. The issue above is specific t=
o
>> >> IO space, which you can resolve both as MMIO, or as "IO" which in lin=
ux
>> >> means going through the special mapping for IO which allows the use o=
f
>> >> the inX/outX instructions...
>> >
>> > I mean that all OF devices have fully resolved MMIO resources. =A0So
>> > very early serial devices that sit in I/O space on sparc64 end
>> > up being OF device drivers. =A0See for example, drivers/net/sunsu.c
>> > which is simply a 8250 chip that sits behind Sun's I/O space bus
>> > that sits on PCI and provides things normally found via ISA on
>> > x86 machines. =A0Another example is drivers/serial/sunsab.c
>>
>> Unfortunately in the embedded powerpc case we don't actually have real
>> OF. =A0We've only got the flattened device tree which usually doesn't
>> itemize the devices behind the PCI bus. =A0Instead we rely on the kernel
>> probing for them.
>
> We -can- itemize the PCI bus, it's up to you.

Yes, we could.  But I don't think it makes any sense to for the FDT
case.  The firmware infrastructure is not in place to fill out the
device tree with the PCI bus layout for the off board devices.

>
> That leads to another interesting discussion...
>
> On ppc64, we have code that can "create" the pci_bus & pci_dev hierarchy
> from the OF tree (avoiding the config space probing entirely). This is
> very efficient and has some advantages such as avoiding touching the
> BARs for sizing (which mean avoiding to temporarily disable access to
> devices behind them, which can be useful when it's your serial port or
> system controller there) etc...
>
> It also have the advantage of avoiding a double PCI probe pass when the
> FW already did it and since most FW do ...
>
> I'm tempted to extract that code and stick it in a
> drivers/pci/probe_of.c or something like that for more generic usage. We
> also have a per-bus hook that allows to switch to "real" config space
> probing at any point of the hierarchy (for example, you can setup things
> so that only on-board devices are in OF and probed that away and
> anything on your slot gets probed by linux using config space, that sort
> of thing).

That would be interesting.

g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2009-05-20 22:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 15:28 Musings on PCI busses Grant Likely
2009-05-19 16:12 ` Arnd Bergmann
2009-05-19 19:05   ` David Miller
2009-05-19 20:02     ` Grant Likely
2009-05-20  5:33     ` Benjamin Herrenschmidt
2009-05-19 16:25 ` Stephen Neuendorffer
2009-05-19 16:30   ` Grant Likely
2009-05-20  3:02   ` Benjamin Herrenschmidt
2009-05-20  3:17     ` Grant Likely
2009-05-20  5:31       ` Benjamin Herrenschmidt
2009-05-20  3:01 ` Benjamin Herrenschmidt
2009-05-20  5:51   ` David Miller
2009-05-20  6:51     ` Benjamin Herrenschmidt
2009-05-20 19:24       ` David Miller
2009-05-20 20:06         ` Grant Likely
2009-05-20 21:59           ` Benjamin Herrenschmidt
2009-05-20 22:28             ` Grant Likely [this message]
2009-05-20 22:41             ` David Miller
2009-05-20 22:49               ` Benjamin Herrenschmidt
2009-05-20 21:56         ` Benjamin Herrenschmidt

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=fa686aa40905201528u65fc611fr64e9ebd296278835@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=John.Linn@xilinx.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=thunderbird2k@gmail.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;
as well as URLs for NNTP newsgroup(s).