From: Segher Boessenkool <segher@kernel.crashing.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Rob Herring (Arm)" <robh@kernel.org>,
Saravana Kannan <saravanak@google.com>,
linuxppc-dev@lists.ozlabs.org, Conor Dooley <conor@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] of: WARN on deprecated #address-cells/#size-cells handling
Date: Wed, 27 Nov 2024 15:42:32 -0600 [thread overview]
Message-ID: <20241127214232.GQ29862@gate.crashing.org> (raw)
In-Reply-To: <87plmi7jjz.fsf@mpe.ellerman.id.au>
On Tue, Nov 26, 2024 at 02:36:32PM +1100, Michael Ellerman wrote:
> Michael Ellerman <mpe@ellerman.id.au> writes:
> > "Rob Herring (Arm)" <robh@kernel.org> writes:
> >> While OpenFirmware originally allowed walking parent nodes and default
> >> root values for #address-cells and #size-cells, FDT has long required
> >> explicit values. It's been a warning in dtc for the root node since the
> >> beginning (2005) and for any parent node since 2007. Of course, not all
> >> FDT uses dtc, but that should be the majority by far. The various
> >> extracted OF devicetrees I have dating back to the 1990s (various
> >> PowerMac, OLPC, PASemi Nemo) all have explicit root node properties.
> >
> > I have various old device trees that have been given to me over the
> > years, and as far as I can tell they all have these properties (some of
> > them are partial trees so it's hard to be 100% sure).
> >
> > So LGTM.
>
> Turns out I was wrong.
>
> The warning about #size-cells hits on some powermacs, possible fixup
> patch here:
>
> https://lore.kernel.org/linuxppc-dev/20241126025710.591683-1-mpe@ellerman.id.au/
The Open Firmware specification is extremely clear that a "missing"
"#size-cells" property means this bus has the default value of 1.
https://www.openfirmware.info/data/docs/of1275.pdf (page 186).
DTC or FDT might want to do things differently, but expecting decades
older stuff to conform to its ill-conceived unnecessarily super wordy
stuff is, well, not a plan that is likely to work very well :-)
Segher
next prev parent reply other threads:[~2024-11-27 21:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20241108110444eucas1p20cbed7533af31573dac30dbb435c3d9d@eucas1p2.samsung.com>
2024-11-06 17:10 ` [PATCH v2] of: WARN on deprecated #address-cells/#size-cells handling Rob Herring (Arm)
2024-11-07 11:35 ` Michael Ellerman
2024-11-08 8:48 ` Geert Uytterhoeven
2024-11-14 2:07 ` Michael Ellerman
2024-11-14 12:54 ` Segher Boessenkool
2024-11-15 14:10 ` Rob Herring
2024-11-26 3:36 ` Michael Ellerman
2024-11-27 21:42 ` Segher Boessenkool [this message]
2024-12-02 14:18 ` Rob Herring
2024-12-02 22:04 ` Segher Boessenkool
2024-12-02 22:55 ` Rob Herring
2024-12-05 22:01 ` Herrenschmidt, Benjamin
2024-11-08 11:04 ` Marek Szyprowski
2024-11-08 13:25 ` Rob Herring
2024-11-08 15:28 ` Marek Szyprowski
2024-11-08 13:26 ` Steven Price
2024-11-08 14:04 ` Rob Herring
2024-11-08 14:33 ` Steven Price
2024-11-08 14:58 ` Rob Herring
2024-11-08 15:29 ` Steven Price
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=20241127214232.GQ29862@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=robh@kernel.org \
--cc=saravanak@google.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).