public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Rob Herring <robh@kernel.org>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	Sasha Levin <sashal@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Doug Anderson <dianders@chromium.org>,
	Julius Werner <jwerner@chromium.org>,
	chrome-platform@lists.linux.dev
Subject: Re: [regression] of: mis-parsing Depthcharge's /firmware
Date: Tue, 28 Apr 2026 13:21:00 -0700	[thread overview]
Message-ID: <afEWrApcO-SRP5Th@google.com> (raw)
In-Reply-To: <20260421193038.GA1502234-robh@kernel.org>

Hi Rob,

Thanks for your thoughts. I delayed a bit since I wasn't really sure
what the right conclusion was and wanted to give it some thought.

On Tue, Apr 21, 2026 at 02:30:38PM -0500, Rob Herring wrote:
> On Mon, Apr 20, 2026 at 03:54:42PM -0700, Brian Norris wrote:
> > You say it's not novel, but then you say the only existing code is
> > either:
> > 
> > 1) completely different, and only applicable to powerpc or
> > 2) only on your local tree.
> > 
> > That sounds novel to me :)
> > 
> > Anyway, I'm more inclined to lean on my #1 and/or #2 than to write a
> > whole new fixup layer. But maybe #1 can be replaced in the future if we
> > come to really want/need a generic fixup layer in the future.
> 
> The problem with #1 is a) new platforms can then repeat the same mistake 
> and b) we'll forget what platforms needed some work-around and whether 
> we still need to maintain such a work-around. Well, I might not forget, 
> but the next DT maintainer (applications welcome!) even won't know. For 
> example, I have know clue if we still need to carry some of the 
> work-arounds embedded into the interrupt parsing code. That all 
> predates me. The only way I find out is breaking them (I'll never 
> understand why people still run PowerMacs from the 1990s).

Ack to most of this. I'll note that it's possible to write unit tests
for this, if we go for the in-kernel route though, so hopefully that'd
give maintainers a bit more visibility.

> Calling the fixup code a layer is an exageration. It's on my kernel.org 
> tree in the dt/fixup-infrastruct branch. And look, guess what issue it 
> was that it has a fixup for.

OK! I spoke in ignorance then. I really haven't explored the device tree
construction / unflattening logic, so it was new to me.

If it really comes to patching the kernel itself, I'll consider pulling
in your patch. On first glance, it looks good, and not that complex even
to an outsider like me.

> > (Frankly, if we do #2, #1 and #3 will probably both be redundant and
> > unnecessary. I don't know of any case here where we're relying on strict
> > DTB ABI compatibility with no opportunity to update some of the DTS
> > sources.)
> 
> Shrug. I thought the ABI was a concern here. It's ultimately up to the 
> maintainers and users of a given platform whether or not they care about 
> the ABI.

I'm usually on the receiving end of people complaining about ABI. It
seems like we bend over backwards in a lot of places (drivers, driver
frameworks) to maintain some idea of DTB ABI, while in practice, the ABI
is almost never a strict concern for anything I've dealt with -- 98% of
the DTB is generated from in-kernel DTS sources that match the kernel.

($subject case is actually the closest we get to DTB ABI concerns,
because it involves the small part of the DTB that is generated by a
program that is independent from the kernel tree. But even there, it's
possible to fix the issue in the kernel-provided source.)

So it seems to me like maybe it's best to just ignore the ABI concern,
patch the DTS and call it a day. I've done that here:

  https://lore.kernel.org/all/20260428200712.2660635-1-briannorris@chromium.org/
  [PATCH 0/7] dts: Add /firmware/#{address,size}-cells to Chromium-based DTs

If someone finds reason we should still go back to fix the kernel
itself, I can resurrect the fixup logic in addition.

Thanks,
Brian

      reply	other threads:[~2026-04-28 20:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 21:07 [GIT PULL] Devicetree updates for v6.13 Rob Herring
2024-11-20 22:56 ` pr-tracker-bot
2024-11-24 16:29 ` Sasha Levin
2024-11-24 16:47   ` Krzysztof Kozlowski
2024-11-24 16:59     ` Sasha Levin
2024-11-25  9:48       ` AngeloGioacchino Del Regno
2024-11-25 10:34         ` Chen-Yu Tsai
2024-11-25 11:00           ` Krzysztof Kozlowski
2024-11-25 11:33             ` Krzysztof Kozlowski
2024-11-25 12:11               ` AngeloGioacchino Del Regno
2024-11-25 13:24               ` Sasha Levin
2024-11-25 15:15                 ` Rob Herring
2024-12-09  9:28                   ` Chen-Yu Tsai
2026-04-17 21:25                     ` [regression] of: mis-parsing Depthcharge's /firmware Brian Norris
2026-04-20 12:57                       ` Rob Herring
2026-04-20 20:57                         ` Brian Norris
2026-04-20 22:19                           ` Rob Herring
2026-04-20 22:54                             ` Brian Norris
2026-04-21 19:30                               ` Rob Herring
2026-04-28 20:21                                 ` Brian Norris [this message]

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=afEWrApcO-SRP5Th@google.com \
    --to=briannorris@chromium.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chrome-platform@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=jwerner@chromium.org \
    --cc=krzk@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashal@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wenst@chromium.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