From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/14] bus: mvebu-mbus: Add static window allocation to the DT binding
Date: Wed, 12 Jun 2013 01:10:36 +0200 [thread overview]
Message-ID: <2269352.fcCKFL4s2D@wuerfel> (raw)
In-Reply-To: <20130611225841.GA13892@obsidianresearch.com>
On Tuesday 11 June 2013 16:58:41 Jason Gunthorpe wrote:
> On Wed, Jun 12, 2013 at 12:34:14AM +0200, Arnd Bergmann wrote:
>
> > a significant waste of physical address space, because the (per-soc)
> > ranges property has to be set up for the largest possible external
> > device connected to the bus, but the mbus window only needs to cover the
> > device that is actually connected.
>
> Yes, but perhaps that is a good argument to not put the ranges in the
> dtsi?
Fair enough. In that case not using ranges at all is probably easier
so the board file only needs to update one place.
> > I think we have to walk the entire tree of devices underneath mbus,
> > at least any device node that has a 'reg' property, following children
> > of any device node with a 'ranges' property. We might need to
> > add a variant of of_get_address() that does a partial translation
> > up to a given node (the mbus) instead of all the way to the root.
>
> Hum, how complex do you think this is? Run down the entire tree,
> translate every regs and maintain a max offset for every target id.
It's the same thing we do for PCI.
> > > then dynamic assignment of that window
> > > makes sense to me. (however, this also looks a bit tricky, how do you
> > > avoid hitting the PCI-E window reservations, for instance?)
> >
> > The PCI-E window would have 'ranges' but no 'regs', so we automatically
> > skip it.
>
> The trouble is not skipping PCI-E when parsing the dt. When the
> kernel goes to make a dynamic window allocation it needs to exclude
> the address space reserved for the PCI-E aperture.
>
> The mbus driver starts before the PCI-E driver, so how can this be
> resolved? Hardwire specialness about PCI-E into mbus?
> Make the PCI-E aperture fully dynamic?
>
> Starting to be pretty complex - for what gain?
I think this can be simplified a lot by making PCI a known special case:
We assign all regular (non-PCI) windows from the top, and whatever is
left by the time PCI comes up can be used for that, starting at the
bottom of the avaliable space.
> > > I'm not sure there is a good reason to reject the address map in the
> > > DT?
> >
> > You mean keep all windows that are listed by the boot loader but
> > reassign the others? I guess it would be simpler but may result in
> > a less optimal address map.
>
> Sure, but what does a more optimal address map get you?
>
> 1) More space to map SDRAM - however - the SDRAM map is controlled
> exclusively by the bootloader and the kernel doesn't have the
> information or the code to mess with it - so this isn't possible
> 2) More space for the PCI-E aperture - this is entirely controlled by
> the kernel, but today we are using the pre-set allocation from the
> DT, so it doesn't matter how tightly the rest of the stuff is packed.
>
> To me, it feels like alot of complex trouble to do actual dynamic
> allocation, and I don't really see any gain.
We could of course decide to skip the dynamic part in the Linux
implementation for the moment, but I would definitely want to
see the binding written in a way that going fully dynamic can be
done later without changing the binding if we decide we need to
squeeze out more RAM or PCI space.
Arnd
next prev parent reply other threads:[~2013-06-11 23:10 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 16:47 [PATCH 00/14] MBus device tree binding Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 01/14] bus: mvebu-mbus: Use pr_fmt Ezequiel Garcia
2013-06-07 16:56 ` Thomas Petazzoni
2013-06-08 14:15 ` Jason Cooper
2013-06-07 16:47 ` [PATCH 02/14] bus: mvebu-mbus: Factor out initialization details Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 03/14] bus: mvebu-mbus: Introduce device tree binding Ezequiel Garcia
2013-06-07 19:10 ` Arnd Bergmann
2013-06-07 19:44 ` Jason Gunthorpe
2013-06-07 19:53 ` Arnd Bergmann
2013-06-07 20:09 ` Jason Gunthorpe
2013-06-07 21:15 ` Arnd Bergmann
2013-06-08 0:26 ` Jason Gunthorpe
2013-06-08 17:29 ` Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 04/14] bus: mvebu-mbus: Add static window allocation to the DT binding Ezequiel Garcia
2013-06-07 19:01 ` Arnd Bergmann
2013-06-07 20:00 ` Jason Gunthorpe
2013-06-07 21:07 ` Arnd Bergmann
2013-06-08 18:38 ` Ezequiel Garcia
2013-06-09 1:45 ` Jason Gunthorpe
2013-06-09 14:39 ` Ezequiel Garcia
2013-06-11 13:57 ` Ezequiel Garcia
2013-06-11 15:26 ` Arnd Bergmann
2013-06-11 21:50 ` Jason Gunthorpe
2013-06-11 22:22 ` Sebastian Hesselbarth
2013-06-11 23:02 ` Arnd Bergmann
2013-06-11 23:08 ` Jason Gunthorpe
2013-06-12 7:37 ` Sebastian Hesselbarth
2013-06-11 22:34 ` Arnd Bergmann
2013-06-11 22:58 ` Jason Gunthorpe
2013-06-11 23:10 ` Arnd Bergmann [this message]
2013-06-12 11:14 ` Grant Likely
2013-06-12 20:45 ` Arnd Bergmann
2013-06-12 21:12 ` Ezequiel Garcia
2013-06-12 21:26 ` Jason Gunthorpe
2013-06-12 21:36 ` Ezequiel Garcia
2013-06-12 21:52 ` Arnd Bergmann
2013-06-12 22:02 ` Jason Gunthorpe
2013-06-12 22:20 ` Arnd Bergmann
2013-06-12 22:24 ` Arnd Bergmann
2013-06-15 16:03 ` Grant Likely
2013-06-12 20:02 ` Ezequiel Garcia
2013-06-12 20:12 ` Jason Gunthorpe
2013-06-12 21:50 ` Arnd Bergmann
2013-06-12 11:07 ` Grant Likely
2013-06-12 11:43 ` Arnd Bergmann
2013-06-12 11:54 ` Grant Likely
2013-06-12 11:58 ` Arnd Bergmann
2013-06-12 10:52 ` Grant Likely
2013-06-09 13:42 ` Arnd Bergmann
2013-06-09 14:34 ` Ezequiel Garcia
2013-06-09 15:37 ` Arnd Bergmann
2013-06-12 10:48 ` Grant Likely
2013-06-11 13:31 ` Ezequiel Garcia
2013-06-11 15:02 ` Arnd Bergmann
2013-06-07 16:47 ` [PATCH 05/14] bus: mvebu-mbus: Update the mbus-compatible node's ranges property Ezequiel Garcia
2013-06-12 10:25 ` Grant Likely
2013-06-07 16:47 ` [PATCH 06/14] ARM: mvebu: Initialize MBus using the DT binding Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 07/14] ARM: mvebu: Remove the harcoded BootROM window allocation Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 08/14] memory: mvebu-devbus: Remove address decoding window workaround Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 09/14] ARM: mvebu: Add MBus to Armada 370/XP device tree Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 10/14] ARM: mvebu: Add BootROM " Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 11/14] ARM: mvebu: Relocate Armada 370/XP DeviceBus device tree nodes Ezequiel Garcia
2013-06-07 19:18 ` Arnd Bergmann
2013-06-07 16:47 ` [PATCH 12/14] ARM: mvebu: Remove device tree unused properties on A370 Ezequiel Garcia
2013-06-07 16:56 ` Thomas Petazzoni
2013-06-08 14:18 ` Jason Cooper
2013-06-07 16:47 ` [PATCH 13/14] ARM: mvebu: Relocate Armada 370 PCIe device tree nodes Ezequiel Garcia
2013-06-07 16:47 ` [PATCH 14/14] ARM: mvebu: Relocate Armada XP " Ezequiel Garcia
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=2269352.fcCKFL4s2D@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).