Skip to content

Commit c961cb3

Browse files
committed
of: Fix cpu node iterator to not ignore disabled cpu nodes
In most cases, nodes with 'status = "disabled";' are treated as if the node is not present though it is a common bug to forget to check that. However, cpu nodes are different in that "disabled" simply means offline and the OS can bring the CPU core online. Commit f1f207e ("of: Add cpu node iterator for_each_of_cpu_node()") followed the common behavior of ignoring disabled cpu nodes. This breaks some powerpc systems (at least NXP P50XX/e5500). Fix this by dropping the status check. Fixes: 651d44f ("of: use for_each_of_cpu_node iterator") Fixes: f1f207e ("of: Add cpu node iterator for_each_of_cpu_node()") Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de> Tested-by: Michael Ellerman <mpe@ellerman.id.au> Cc: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 204c881 commit c961cb3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/of/base.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,6 @@ struct device_node *of_get_next_cpu_node(struct device_node *prev)
776776
if (!(of_node_name_eq(next, "cpu") ||
777777
(next->type && !of_node_cmp(next->type, "cpu"))))
778778
continue;
779-
if (!__of_device_is_available(next))
780-
continue;
781779
if (of_node_get(next))
782780
break;
783781
}

0 commit comments

Comments
 (0)