Skip to content

lopper_lib.py: Restrict cpu_refs to direct CPU child nodes#714

Merged
zeddii merged 1 commit intodevicetree-org:masterfrom
Rajukumar45:master
Mar 13, 2026
Merged

lopper_lib.py: Restrict cpu_refs to direct CPU child nodes#714
zeddii merged 1 commit intodevicetree-org:masterfrom
Rajukumar45:master

Conversation

@Rajukumar45
Copy link
Contributor

The cpu_refs helper was previously searching for any "cpu@*" subnode under a CPU node using a path-based match. That could accidentally pick up nested cache nodes or other children whose paths include "cpu@", which leads to spurious CPU references in the aggregate list.

By switching to a child-only lookup, we now only consider direct CPU children of the target node and ignore nested descendants.

Examples:

  • Before: /cpus/cpu@0/l2-cache/cpu@* could be matched as a CPU
  • After: only /cpus/cpu@* direct children are collected

The cpu_refs helper was previously searching for any "cpu@*"
subnode under a CPU node using a path-based match. That could
accidentally pick up nested cache nodes or other children whose
paths include "cpu@", which leads to spurious CPU references in
the aggregate list.

By switching to a child-only lookup, we now only consider direct
CPU children of the target node and ignore nested descendants.

Examples:
- Before: /cpus/cpu@0/l2-cache/cpu@* could be matched as a CPU
- After:  only /cpus/cpu@* direct children are collected
@zeddii zeddii merged commit 48d4035 into devicetree-org:master Mar 13, 2026
1 of 3 checks passed
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.

3 participants