From: Arnd Bergmann <arnd@arndb.de>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-arm <linux-arm-kernel@lists.infradead.org>,
Liviu Dudau <liviu@dudau.co.uk>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Will Deacon <will.deacon@arm.com>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Russell King <rmk@arm.linux.org.uk>,
Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v2 3/3] PCI: ARM: add support for generic PCI host controller
Date: Wed, 19 Feb 2014 20:06:25 +0100 [thread overview]
Message-ID: <3312083.odPX4th7oi@wuerfel> (raw)
In-Reply-To: <CAErSpo7JNyqK3NZgP++OWkQYQzZ1_BdR3GrK3vOd8c=_YAX7nA@mail.gmail.com>
On Wednesday 19 February 2014 11:20:19 Bjorn Helgaas wrote:
> On Wed, Feb 19, 2014 at 2:58 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 18 February 2014 17:28:14 Bjorn Helgaas wrote:
> > The second one seems a little easier to implement, and I don't
> > see what _SEG is used for other than to avoid having domains
> > when you don't need them. Is there more to it that I'm missing?
>
> Not really, but I do have a question related to OS management of host
> bridge bus number apertures. Currently, Linux never changes a host
> bridge's bus number range, but it's conceivable that we could in some
> hotplug scenario. ACPI does provide a mechanism to do so (_PRS,
> _SRS), and other host bridge drivers could also do this by programming
> CSRs to change the bus number range. The PCI domain is the logical
> place to manage allocation of the 00-ff range of bus numbers.
>
> 1) x86 platforms may have constraints because PCIBIOS and the 0xcf8
> config access mechanism are unaware of segments. If a platform has to
> support legacy OSes that use those, it can't reuse bus numbers even in
> different segment groups. The platform might have to use multiple
> segments to allow multiple ECAM regions, but use _PRS/_SRS to prevent
> bus number overlaps to keep legacy config access working. Obviously
> this is only an issue if there are non-segment aware config access
> methods.
Right, I don't think this will be an issue outside of x86/ia64/alpha,
since on all other architectures I'm aware of you have no PCIBIOS
and each host controller would also have its own config space.
Even host controllers using 0xfc8 would be fine because each host
bridge normally has its own I/O space.
> 2) If two host bridges share an ECAM region, I think we're forced to
> put them in the same domain: if we put them in different domains,
> Linux might assign [bus 00-ff] to both bridges, and ECAM config
> accesses would only work for one of the bridges. This is quite common
> on x86 and is a potential issue for any architecture.
Right, this is an interesting case indeed, and I think we haven't
considered it in the binding so far. We already encode a "bus-range"
in DT, so we can easily partition the ECAM config space, but it
still violates one of the two assumptions:
a) that the register ranges for the two host bridge devices are
non-overlapping in DT
b) that the ECAM register range as specified in DT starts at bus
0 and is a power-of-two size.
Since the binding is not fixed that, we could change the definition to
say that the ECAM register range in the "reg" property must match
the buses listed in the "bus-range" property.
I still want to make sure I understand exactly what this case is about
though, i.e. what is shared and what is separate if you have two host
bridges with a common ECAM region:
* I assume I/O space is always shared on x86, but probably separate
elsewhere.
* Each host would always have a fixed memory space aperture, right?
* From what I understand from your description, the hardware does
not enforce specific bus numbers for each host. How does the
host bridge know its root bus number then?
* Should I expect one IOMMU per host bridge or one ECAM region,
or can either be possible?
* The IntA-IntB IRQ numbers are always per host bridge I assume.
* Memory space on one host bridge is visible to bus master DMA
from a device on another host bridge on x86, right? I assume
this won't normally be the case on other architectures.
Arnd
next prev parent reply other threads:[~2014-02-19 19:06 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 20:16 [PATCH v2 0/3] ARM: PCI: implement generic PCI host controller Will Deacon
2014-02-12 20:16 ` [PATCH v2 1/3] ARM: mach-virt: allow PCI support to be selected Will Deacon
2014-02-12 20:16 ` [PATCH v2 2/3] ARM: bios32: use pci_enable_resource to enable PCI resources Will Deacon
2014-02-12 22:28 ` Jason Gunthorpe
2014-02-13 10:06 ` Will Deacon
2014-02-13 12:22 ` Jingoo Han
2014-02-12 20:16 ` [PATCH v2 3/3] PCI: ARM: add support for generic PCI host controller Will Deacon
2014-02-12 20:59 ` Arnd Bergmann
2014-02-13 11:04 ` Will Deacon
2014-02-13 11:47 ` Arnd Bergmann
2014-02-13 12:00 ` Will Deacon
2014-02-13 12:21 ` Arnd Bergmann
2014-02-12 21:51 ` Kumar Gala
2014-02-13 11:07 ` Will Deacon
2014-02-13 16:22 ` Kumar Gala
2014-02-13 16:25 ` Will Deacon
2014-02-13 16:28 ` Arnd Bergmann
2014-02-13 18:11 ` Mark Rutland
2014-02-13 18:26 ` Jason Gunthorpe
2014-02-13 19:53 ` Will Deacon
2014-02-13 20:20 ` Jason Gunthorpe
2014-02-14 9:59 ` Arnd Bergmann
2014-02-14 22:00 ` Liviu Dudau
2014-02-15 13:03 ` Arnd Bergmann
2014-02-18 17:41 ` Jason Gunthorpe
2014-02-18 18:25 ` Arnd Bergmann
2014-02-18 18:45 ` Jason Gunthorpe
2014-02-18 19:13 ` Arnd Bergmann
2014-02-19 2:44 ` Liviu Dudau
2014-02-19 6:48 ` Jason Gunthorpe
2014-02-19 10:24 ` Arnd Bergmann
2014-02-19 11:37 ` Liviu Dudau
2014-02-19 13:26 ` Arnd Bergmann
2014-02-19 15:30 ` Liviu Dudau
2014-02-19 19:47 ` Arnd Bergmann
2014-02-19 0:28 ` Bjorn Helgaas
2014-02-19 9:58 ` Arnd Bergmann
2014-02-19 18:20 ` Bjorn Helgaas
2014-02-19 19:06 ` Arnd Bergmann [this message]
2014-02-19 20:18 ` Bjorn Helgaas
2014-02-19 20:48 ` Arnd Bergmann
2014-02-19 21:10 ` Jason Gunthorpe
2014-02-19 21:33 ` Bjorn Helgaas
2014-02-19 22:12 ` Arnd Bergmann
2014-02-19 22:18 ` Bjorn Helgaas
2014-02-13 19:52 ` Rob Herring
2014-02-13 18:06 ` Jason Gunthorpe
2014-02-13 19:51 ` Will Deacon
2014-02-13 18:26 ` [PATCH v2 0/3] ARM: PCI: implement " Jason Gunthorpe
2014-02-14 11:05 ` Arnd Bergmann
2014-02-18 18:00 ` Jason Gunthorpe
2014-02-18 18:40 ` Arnd Bergmann
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=3312083.odPX4th7oi@wuerfel \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=galak@codeaurora.org \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=liviu@dudau.co.uk \
--cc=rmk@arm.linux.org.uk \
--cc=will.deacon@arm.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).