From: Steven Price <steven.price@arm.com>
To: Rob Herring <robh@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Saravana Kannan <saravanak@google.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
linuxppc-dev@lists.ozlabs.org, Conor Dooley <conor@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v2] of: WARN on deprecated #address-cells/#size-cells handling
Date: Fri, 8 Nov 2024 14:33:38 +0000 [thread overview]
Message-ID: <e23ecbab-66ba-478c-b720-fb045a08bc9c@arm.com> (raw)
In-Reply-To: <CAL_JsqLyFV85w1kf397AcvZ7+Oewpe3vYeZdz_uvQrYwb1B8ag@mail.gmail.com>
On 08/11/2024 14:04, Rob Herring wrote:
> On Fri, Nov 8, 2024 at 7:26 AM Steven Price <steven.price@arm.com> wrote:
>>
>> On 08/11/2024 11:04, Marek Szyprowski wrote:
>>> Hi Rob,
>>>
>>> On 06.11.2024 18:10, Rob Herring (Arm) wrote:
>>>> 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. The
>>>> warning is disabled for Sparc as there are known systems relying on
>>>> default root node values.
>>>>
>>>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>>>> ---
>>>> v2:
>>>> - Add a define for excluded platforms to help clarify the intent
>>>> is to have an exclude list and make adding platforms easier.
>>>> - Also warn when walking parent nodes.
>>>> ---
>>>> drivers/of/base.c | 28 ++++++++++++++++++++++------
>>>> drivers/of/fdt.c | 4 ++--
>>>> 2 files changed, 24 insertions(+), 8 deletions(-)
>>>
>>> This patch landed in today's linux-next as commit 4b28a0dec185 ("of:
>>> WARN on deprecated #address-cells/#size-cells handling"). In my tests I
>>> found that it introduces warnings on almost all of my test systems. I
>>> took a look at the first one I got in my logs (Samsung Exynos Rinato
>>> board: arch/arm/boot/dts/samsung/exynos3250-rinato.dts):
>>
>> Just a "me too" for rk3288-firefly.dtb:
>>
>> [ 0.138735] WARNING: CPU: 0 PID: 1 at drivers/of/base.c:106 of_bus_n_addr_cells+0x9c/0xd8
>> [ 0.138776] Missing '#address-cells' in /power-management@ff730000
>>
>> I'm sure it's easy to fix up the DTB, but we shouldn't be breaking long existing DTBs.
>
> What broke?
Nothing 'broke' as such (the board continued booting) but the WARN
shouldn't be happening. My CI treats the WARN as a failure as these
shouldn't occur unless there's a programming error.
> The intent here is to exclude any platforms/arch which actually need
> the deprecated behavior, not change DTBs. That's spelled out at the
> WARN which I assume people would read before fixing "Missing
> '#address-cells' in /power-management@ff730000". I tried to make the
> warn message indicate that on v1 with:
>
> WARN_ONCE(!IS_ENABLED(CONFIG_SPARC), "Only listed platforms should
> rely on default '#address-cells'\n");
So one possibility is to include this platform in the exclusion list -
but I'm not sure how to do that, I assume including CONFIG_ARM in the
list would rather defeat the point of the patch. But my feeling is that
it would involve a lot of playing whack-a-mole to identify individual
platforms.
One obvious idea would be to look at the DTBs in the kernel tree and see
which are affected by this currently, that might be a good place to
start with an exclusion list.
You could also downgrade the warning to a pr_warn() or similar.
> But Conor thought that wasn't clear. So I'm open to suggestions...
I don't have any particular suggestions other than above, I just wanted
to report an existing DTB that triggers this WARN. We need to resolve
this one way or another before this patch can progress. For now I've
simply reverted this patch for my CI.
Steve
next prev parent reply other threads:[~2024-11-08 14:34 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
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 [this message]
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=e23ecbab-66ba-478c-b720-fb045a08bc9c@arm.com \
--to=steven.price@arm.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=m.szyprowski@samsung.com \
--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).