From: Grant Likely <grant.likely@secretlab.ca>
To: Tomasz Figa <tomasz.figa@gmail.com>, Olof Johansson <olof@lixom.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Stephen Warren <swarren@wwwdotorg.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Stephen Warren <swarren@nvidia.com>,
Rob Herring <rob.herring@calxeda.com>
Subject: Re: "memory" binding issues
Date: Tue, 17 Sep 2013 18:31:12 -0700 [thread overview]
Message-ID: <20130918013112.1104CC42BDB@trevor.secretlab.ca> (raw)
In-Reply-To: <1815499.tpfeUKmP6V@flatron>
On Tue, 17 Sep 2013 09:56:39 +0200, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> On Monday 16 of September 2013 15:48:22 Olof Johansson wrote:
> > On Mon, Sep 16, 2013 at 3:46 PM, Benjamin Herrenschmidt
> > > On Mon, 2013-09-16 at 10:17 -0600, Stephen Warren wrote:
> > >> On 09/15/2013 08:57 PM, Benjamin Herrenschmidt wrote:
> > >> > It should be "/memory@unit-address, this is important because the
> > >> > Linux
> > >> > kernel of_find_device_by_path() isn't smart enough to do partial
> > >> > searches (unlike the real OFW one) and thus to ignore the unit
> > >> > address
> > >> > for search purposes, and you *need* the unit address if you have
> > >> > multiple memory nodes (which you typically do on NUMA machines).
> > >>
> > >> Perhaps /memory should have had a unit-address, but it never has had
> > >> on
> > >
> > >> ARM; see arch/arm/boot/dts/skeleton.dtsi which says:
> > > Well, this is a mistake ARM folks might have done from day one but it
> > > should still be fixed :-)
> > >
> > > A node that has a "reg" property should have the corresponding unit
> > > address.
> >
> > No, absolutely _NOT_ a requirement. Unit address is only required if
> > needed to disambiguate two properties with the same name.
> >
> > If there are no ambiguities, then leaving off the unit address is much
> > preferred.
>
> I'm afraid that I must disagree. For consistency I'd rather go with what
> Ben said. Please see ePAPR chapter 2.2.1.1, which clearly defines how
> nodes should be named.
Regardless of the ePAPR spec, there is loads of precidence of having a
single memory node without the unit address, and we have to continue to
support those device trees. Just do a "git grep 'memory ' arch/*/boot/dts/*"
to get a big list. You'll note that there are a lot of powerpc matches
in that list.
Similarly, if the kernel chokes on memory node(s) that have the unit
address then that is a bug and needs to be fixed.
g.
next prev parent reply other threads:[~2013-09-18 6:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 2:57 Benjamin Herrenschmidt
2013-09-16 15:22 ` Kumar Gala
2013-09-16 22:42 ` Benjamin Herrenschmidt
2013-09-17 15:53 ` Kumar Gala
2013-09-16 16:17 ` Stephen Warren
2013-09-16 22:46 ` Benjamin Herrenschmidt
2013-09-16 22:48 ` Olof Johansson
2013-09-16 23:47 ` Benjamin Herrenschmidt
2013-09-16 23:48 ` Olof Johansson
2013-09-17 1:37 ` Benjamin Herrenschmidt
2013-09-17 7:56 ` Tomasz Figa
2013-09-17 16:43 ` Olof Johansson
2013-09-17 21:08 ` Frank Rowand
2013-09-17 21:15 ` Olof Johansson
2013-09-17 21:19 ` Tomasz Figa
2013-09-17 21:33 ` Olof Johansson
2013-09-17 23:04 ` Benjamin Herrenschmidt
2013-09-17 23:25 ` Olof Johansson
2013-09-17 21:56 ` Benjamin Herrenschmidt
2013-09-18 16:28 ` Stephen Warren
2013-09-19 0:29 ` David Gibson
2013-09-18 1:25 ` David Gibson
2013-09-18 1:31 ` Grant Likely [this message]
2013-09-18 1:38 ` Grant Likely
2013-09-18 8:08 ` Benjamin Herrenschmidt
2013-09-18 2:57 ` Grant Likely
2013-09-18 8:21 ` Benjamin Herrenschmidt
2013-09-27 15:42 ` Kumar Gala
2013-10-03 15:04 ` Kumar Gala
-- strict thread matches above, loose matches on Subject: below --
2013-09-16 2:41 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=20130918013112.1104CC42BDB@trevor.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=tomasz.figa@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
all inboxes | Powered by JetHome®