Files
xen/xen
Michal Orzel 239b0c8f06 dt-overlay: Ignore nodes that do not have __overlay__ as their subnode
Assumption stated in the comments as if fdt_for_each_subnode() checks
for parent < 0 is utterly wrong. If parent is < 0, node offset is set to
0 (i.e. the very first node in the tree) and the loop's body is executed.
This incorrect assumption causes overlay_node_count() to also count nodes
that do not have __overlay__ as their subnode. The same story goes for
overlay_get_nodes_info(), where we end up requiring each node directly
under root node to have "target-path" set. DTBOs can specify other nodes
including special ones like __symbols__, __fixups__ that can be left to
reduce the number of steps a user needs to do to when it comes to invalid
phandles.

Fix it by adding checks if overlay < 0 after respective calls to
fdt_subnode_offset().

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-10-10 16:18:56 +01:00
..
2017-03-06 17:49:45 +01:00
2024-10-10 10:53:15 +02:00
2024-10-09 09:56:43 +02:00
2024-09-12 09:11:53 +02:00
2024-10-10 10:59:38 +02:00
2024-07-22 16:25:07 +01:00
2024-05-29 10:44:03 +01:00