Skip to content

zephyr_domain_dts: refresh Versal IPI node after rename - #880

Open
Harini-T wants to merge 1 commit into
devicetree-org:masterfrom
Harini-T:fix/zephyr-versal-ipi-pruning
Open

Harini-T wants to merge 1 commit into
devicetree-org:masterfrom
Harini-T:fix/zephyr-versal-ipi-pruning

Conversation

@Harini-T

Copy link
Copy Markdown

SDTGen now names Versal IPI destination nodes mailbox@. The Zephyr assist renames these nodes to child@. This re-syncs the tree and replaces the node object. Subsequent schema pruning continued through the stale pre-rename object, leaving SDT-only properties such as xlnx,ipi-bitmask in the generated Zephyr DTS.

Look up the live node after the rename so the existing compatible-based cleanup prunes the node stored in the tree.

SDTGen now names Versal IPI destination nodes mailbox@<addr>. The
Zephyr assist renames these nodes to child@<addr>. This re-syncs the
tree and replaces the node object. Subsequent schema pruning continued
through the stale pre-rename object, leaving SDT-only properties such as
xlnx,ipi-bitmask in the generated Zephyr DTS.

Look up the live node after the rename so the existing compatible-based
cleanup prunes the node stored in the tree.

Signed-off-by: Harini T <[email protected]>
@Harini-T

Harini-T commented Nov 24, 2026 •

Copy link
Copy Markdown
Author

Hi @zeddii , @onkarharsh , @sathishkumar-amd
LopperTree.rename() calls sync() when the node path changes. The sync reloads the renamed node, so the object currently returned by rename() is stale.
The local Zephyr fix re-fetches the node:
sdt.tree.rename(node, new_name) node = sdt.tree[node.abs_path]
Would it be preferable to handle this in LopperTree.rename() by returning the live node instead?
self.sync() self.update_path_refs(old_path, new_path) return self[new_path]
Callers that need to continue modifying the node could then use:
node = sdt.tree.rename(node, new_name)
This would address the underlying API behavior rather than requiring each caller to re-fetch the node. Are there compatibility concerns with changing the returned object?

CC: @sivadur

@Harini-T

Copy link
Copy Markdown
Author

The CI checks failure is some intermittent issue. Unable to reproduce

@zeddii

zeddii commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

I have a set of tree sanity / cleanup items that I added to my TODO list over the past few months. The semantics around some of the tree operations were some of them (as I investigated options for tree management). It isn't quite a simple as just returning the new vs the old node, but I can grab that chunk out of my TODO and work on it now. Stay tuned.

@Harini-T

Copy link
Copy Markdown
Author

Hi @zeddii , can you please take this on priority? As this P1, can we take this PR and later work on the tree level changes?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants