hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/of/of_numa.c
....@@ -24,18 +24,9 @@
2424 {
2525 u32 nid;
2626 int r;
27
- struct device_node *cpus;
28
- struct device_node *np = NULL;
27
+ struct device_node *np;
2928
30
- cpus = of_find_node_by_path("/cpus");
31
- if (!cpus)
32
- return;
33
-
34
- for_each_child_of_node(cpus, np) {
35
- /* Skip things that are not CPUs */
36
- if (of_node_cmp(np->type, "cpu") != 0)
37
- continue;
38
-
29
+ for_each_of_cpu_node(np) {
3930 r = of_property_read_u32(np, "numa-node-id", &nid);
4031 if (r)
4132 continue;
....@@ -46,8 +37,6 @@
4637 else
4738 node_set(nid, numa_nodes_parsed);
4839 }
49
-
50
- of_node_put(cpus);
5140 }
5241
5342 static int __init of_numa_parse_memory_nodes(void)