From: Rob Herring <robh@kernel.org>
To: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Cc: Saravana Kannan <saravanak@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Shawn Guo <shawnguo@kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Grant Likely <grant.likely@linaro.org>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
David Daney <david.daney@cavium.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/6] of/overlay: look up absolute target-paths absolutely
Date: Wed, 18 Nov 2026 09:51:03 -0600 [thread overview]
Message-ID: <20261118155103.GA2141649-robh@kernel.org> (raw)
In-Reply-To: <20261014-nh-of-alias-overlay-v8-1-0f74f05ac762@nexthop.ai>
On Wed, Oct 14, 2026 at 04:17:26PM -0700, Abdurrahman Hussain wrote:
> find_target() with a non-NULL target base concatenates the base path
> and the fragment's target-path via "%pOF%s": target-path="/foo"
> resolves to "<base>/foo" and can never reach the DT root. An overlay
> applied with a base cannot both extend the base subtree and add
> /aliases entries, which is what a PCI device declaring its
> peripherals under dev_of_node() needs for alias-based bus numbering.
The current behavior seems correct to me. The overlay should not modify
anything above target_base. Correct or not, couldn't someone be relying
on current behavior?
>
> Treat any non-empty target-path as absolute. An empty target-path
> still means the base itself, the only form used by the one in-tree
> caller passing a base (drivers/misc/lan966x_pci.c).
>
> Spell the contract out in the kernel-doc for @base/@target_base and
> in find_target()'s strategy comment.
>
> Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
> ---
> drivers/of/overlay.c | 38 ++++++++++++++++++--------------------
> 1 file changed, 18 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> index 83c56dd9b5d8..6f2d7872028a 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -692,12 +692,15 @@ static int build_changeset(struct overlay_changeset *ovcs)
> *
> * 1) "target" property containing the phandle of the target
> * 2) "target-path" property containing the path of the target
> + *
> + * With a non-NULL @target_base, an empty "target-path" means
> + * @target_base itself; any non-empty "target-path" is resolved
> + * absolutely from the live-tree root.
If we are going to improve this, it should also define what NULL
@target_base means.
Rob
next prev parent reply other threads:[~2026-11-18 15:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 23:17 [PATCH v8 0/6] of: teach overlay code to keep /aliases in sync Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 1/6] of/overlay: look up absolute target-paths absolutely Abdurrahman Hussain
2026-11-18 15:51 ` Rob Herring [this message]
2026-11-19 2:59 ` Abdurrahman Hussain
2026-10-14 23:17 ` [PATCH v8 2/6] of/overlay: return ERR_PTR from dup_and_fixup_symbol_prop() Abdurrahman Hussain
2026-11-18 15:53 ` Rob Herring
2026-10-14 23:17 ` [PATCH v8 3/6] of: hold a reference on of_aliases during alias path resolution Abdurrahman Hussain
2026-10-14 23:32 ` sashiko-bot
2026-10-14 23:17 ` [PATCH v8 4/6] of: update /aliases lookup on reconfig notifications Abdurrahman Hussain
2026-10-14 23:29 ` sashiko-bot
2026-10-14 23:17 ` [PATCH v8 5/6] of/overlay: rewrite /aliases path values to live-tree paths Abdurrahman Hussain
2026-10-14 23:27 ` sashiko-bot
2026-10-14 23:17 ` [PATCH v8 6/6] of: unittest: cover /aliases updates from overlay apply/revert Abdurrahman Hussain
2026-11-05 0:09 ` [PATCH v8 0/6] of: teach overlay code to keep /aliases in sync Abdurrahman Hussain
2026-11-05 12:40 ` Rob Herring
2026-11-06 2:11 ` Abdurrahman Hussain
2026-11-06 13:24 ` Rob Herring
2026-11-06 19:51 ` Abdurrahman Hussain
2026-11-12 22:12 ` Rob Herring
2026-11-13 1:23 ` Abdurrahman Hussain
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=20261118155103.GA2141649-robh@kernel.org \
--to=robh@kernel.org \
--cc=abdurrahman@nexthop.ai \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=grant.likely@secretlab.ca \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pantelis.antoniou@konsulko.com \
--cc=saravanak@kernel.org \
--cc=shawnguo@kernel.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.