}
}
-static void __init parse_cluster(struct device_node *cluster)
+static void __init parse_cluster(struct device_node *cluster, int depth)
{
char name[10];
bool leaf = true;
snprintf(name, sizeof(name), "cluster%d", i);
c = of_get_child_by_name(cluster, name);
if (c) {
- parse_cluster(c);
+ parse_cluster(c, depth + 1);
leaf = false;
}
i++;
if (c) {
has_cores = true;
+ if (depth == 0)
+ pr_err("%s: cpu-map children should be clusters\n",
+ c->full_name);
+
if (leaf)
parse_core(c, core_id++);
else
cn = of_find_node_by_name(cn, "cpu-map");
if (!cn)
return;
- parse_cluster(cn);
+ parse_cluster(cn, 0);
for_each_possible_cpu(cpu) {
const u32 *rate;