Repository navigation
assists: xlnx_overlay_pl_dt: keep nodes within reachable sibling reg ranges - #856
Conversation
|
@onkarharsh , please review. |
onkarharsh
left a comment
There was a problem hiding this comment.
Looks good to me. Fixes the regression issue created with the first patch.
|
There is a behaviour change in here that the title does not cover, and I would
if cpu_cluster not in sdt.tree.accessible_by(base):
... dropso a node that nothing could reach failed that test and was dropped, with the if cpu_cluster in reachable_by: # keep, and record its ranges
elif reachable_by: # drop candidateand a node whose If that is part of what you are fixing from b224d46 -- a PL node that no Smaller thing, take it or leave it. The containment test looks at the candidate's if any(rb <= base < rb + rs for rb, rs in reachable_ranges)so a node starting inside a reachable sibling's range but extending past the end |
…ranges drop_unreachable_pl_nodes() dropped every PL child whose first reg base was absent from the target cluster's address-map. This is correct for peripherals wired exclusively to another cluster, but it also dropped nodes whose addresses fall within a reg range of a sibling that the target cluster can reach. Collect all reg ranges from nodes whose first base is reachable by the target cluster. Before dropping a node, check whether its base falls within any of those ranges. If it does, keep the node, its address is covered by a device the cluster can already access. Nodes that are genuinely unreachable (mapped only by other clusters and not covered by any reachable sibling range) are still excluded as before. Nodes absent from every cluster's address-map are retained as no other cluster claims them. Signed-off-by: Aravind Thokala <aravind.thokala@amd.com>
35fb557 to
a1dbd7b
Compare
|
Hi @zeddii , Thank you for reviewing.
A node that nothing could reach is kept and I added this point in latest commit description.
Acknowledged. The current check is sufficient for the known use cases. Keeping it as-is for now. |
|
Thanks for the answers. merging! |
Issue:
drop_unreachable_pl_nodes() dropped every PL child whose first reg base was absent from the target cluster's address-map. This is correct for peripherals wired exclusively to another cluster, but it also dropped nodes whose addresses fall within a reg range of a sibling that the target cluster can reach.
Fix:
Collect all reg ranges from nodes whose first base is reachable by the target cluster. Before dropping a node, check whether its base falls within any of those ranges. If it does, keep the node, its address is covered by a device the cluster can already access.
Nodes that are genuinely unreachable (mapped only by other clusters and not covered by any reachable sibling range) are still excluded as before.