All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Simon Glass <sjg@chromium.org>,
	Devicetree Compiler <devicetree-compiler@vger.kernel.org>
Subject: Re: [PATCH v2 0/6] dtc: Fix deletes within a section and before a redefinition
Date: Wed, 4 Nov 2026 09:48:34 +0100	[thread overview]
Message-ID: <20261104094834.5aaf1b17@bootlin.com> (raw)
In-Reply-To: <aurKRLcMjjFA70CM@gractus.seuss>

Hi David,

On Wed, 4 Nov 2026 17:01:55 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Tue, Nov 03, 2026 at 02:00:30PM +0100, Herve Codina wrote:
> > Hi Simon, David,
> > 
> > On Mon, 2 Nov 2026 12:41:24 +1100
> > David Gibson <david@gibson.dropbear.id.au> wrote:
> > 
> > ...
> >   
> > > 
> > > Yes, that was my intention, though we can revisit it if that breakgs
> > > things for people in practice.  This was the way it was before
> > > source-level overlays were implemented, and still is for the "base"
> > > tree fragment in a file.
> > >   
> > > > In an overlay, a top-level /delete-node/ &label can remove a node from
> > > > another fragment of the same overlay, as Hervé pointed out. I assume
> > > > that should keep working, with only deletes of something in the base
> > > > tree being an error. Is that right?    
> > > 
> > > Uh.. yes.  In a sense this is a question of whether we try to
> > > partially resolve the overlays in a /plugin/ dts or not.  i.e. Do we
> > > attempt to merge those fragments we can, or do we translate every
> > > fragment directly into the dtbo to be resolved at runtime.  I'm not
> > > sure there's a clear correct answer here, so I'd err on the side of
> > > maintaining existing behaviour.
> > >   
> > 
> > David, I don't see you point here.
> > 
> > IMHO, /delete-node/ and /delete-property/ keywords present in a dts
> > apply to the generated dtb.
> > 
> > A dts with /delete-*/ will generate a dtb with related node/property
> > deleted.
> > 
> > A dtso with /delete-*/ will generate a dtbo with related node/property
> > deleted.
> > 
> > David, I don't see why resolution is (or should be) involved here.  
> 
> So the restructure I'm now suggesting here means that processing those
> deletes doesn't happen during the parse, but as an explicit later
> step.  For dtb output, that must result in a single tree.  For dtbo
> output although we may be able to merge some parts, we don't expect to
> be able to fully resolve them.

Yes.

> 
> Given that, and ignoring deletes for now, the merge step could be
> entirely skipped for dtbo output: just emit each dts fragment as a
> dtbo fragment and let them be resolved at runtime, regardless of
> whether they modify things from a base tree or from earlier fragment.

IHMO, having possible merges done is better but well, we can have
unmerged fragments.

> 
> However, once we consider deletes we need an intermediate
> representation of "a delete" within a fragment.  But that can't be
> encoded into dbto format.  So, deletes in a /plugin/ dts require that
> we attempt to resolve the fragment merge (as much as we can), rather
> than leaving it all to runtime.
> 

Ok.

Best regards,
Hervé

  reply	other threads:[~2026-11-04  8:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  9:36 [PATCH v2 0/6] dtc: Fix deletes within a section and before a redefinition Simon Glass
2026-10-28  9:36 ` [PATCH v2 1/6] dtc: Apply deletes in the section which has them Simon Glass
2026-10-28  9:36 ` [PATCH v2 2/6] dtc: Remove a deleted node or property from the tree Simon Glass
2026-10-28  9:36 ` [PATCH v2 3/6] dtc: Clarify when delete placeholders are dropped Simon Glass
2026-10-28 17:56   ` Herve Codina
2026-10-29  8:59     ` Simon Glass
2026-10-28  9:36 ` [PATCH v2 4/6] tests: Allow dtc-fatal.sh to check the error message Simon Glass
2026-10-28 18:02   ` Herve Codina
2026-10-29  7:21   ` Herve Codina
2026-10-29  9:01     ` Simon Glass
2026-10-28  9:36 ` [PATCH v2 5/6] dtc: Report an error for a delete in an overlay fragment Simon Glass
2026-10-28 18:17   ` Herve Codina
2026-10-29  9:04     ` Simon Glass
2026-10-30  3:46       ` David Gibson
2026-10-28  9:36 ` [PATCH v2 6/6] doc: dts-format: Describe later definitions and deletes Simon Glass
2026-10-28 18:25   ` Herve Codina
2026-10-29  9:06     ` Simon Glass
2026-10-29  2:49 ` [PATCH v2 0/6] dtc: Fix deletes within a section and before a redefinition David Gibson
2026-11-01 16:35   ` Simon Glass
2026-11-02  1:41     ` David Gibson
2026-11-03 13:00       ` Herve Codina
2026-11-04  6:01         ` David Gibson
2026-11-04  8:48           ` Herve Codina [this message]
2026-11-04  9:21             ` David Gibson

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=20261104094834.5aaf1b17@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree-compiler@vger.kernel.org \
    --cc=sjg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.