From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: linuxppc-dev@ozlabs.org, thunderbird2k@gmail.com, John.Linn@xilinx.com
Subject: Re: Musings on PCI busses
Date: Wed, 20 May 2009 16:51:07 +1000 [thread overview]
Message-ID: <1242802267.16901.187.camel@pasglop> (raw)
In-Reply-To: <20090519.225118.58497608.davem@davemloft.net>
On Tue, 2009-05-19 at 22:51 -0700, David Miller wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Wed, 20 May 2009 13:01:30 +1000
>
> > For example, some of the OF parsing bits may fail to convert memory
> > addresses to IO addresses if the PCI host bridges have not been
> > discovered yet, potentially causing issues with matching of resources
> > between the early serial stuff and the generic serial driver (if you
> > use an IO driven UART, the PCI 8250 driver may not properly figure out
> > that what it's finding in its IO BARs is actually the same port as
> > what it gets from the platform code as the later will end up with
> > memory addresses rather than IO ones). That's one example.
>
> FWIW, I never run into this issue on sparc64 exactly because I
> fully resolve all resources when I populate the OF device tree
> in the kernel.
What do you mean by fully resolve ? IE. The issue above is specific to
IO space, which you can resolve both as MMIO, or as "IO" which in linux
means going through the special mapping for IO which allows the use of
the inX/outX instructions...
The later can only be done after we have established the special mapping
in question for a given PCI bus IO space, at which point, we know what
IO "base" corresponds to the IO space of that bridge. So in the
meantime, all we have is an MMIO resource, which is "resolved" in the
sense that it does contain all the right bits to get the serial ports
(address translation etc...) but isn't an IORESOURCE_IO type resource
and thus doesn't contain a magic token we can pass to inX/outX.
One of the issues we may have here on powerpc is that our very early
probe of serial ports (so we get some debug output early) may get to
those resources while the serial driver later sees the actual
IORESOURCE_IO resources coming from the PCI probe, and is unable to
figure that they are the same things.
Currently, we do a pass of "conversion" over those early resolved
resources just after the PCI bridges have been discovered to check if
they happen to land into the IO space of a bridge and then turn them
into IORESOURCE_IO tokens.
If we delay the probing of PCI bridges, things can get fishy there.
Cheers,
Ben.
next prev parent reply other threads:[~2009-05-20 7:08 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 [this message]
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
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=1242802267.16901.187.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=John.Linn@xilinx.com \
--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).