aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/kernel/topology.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index 1c6a65e3aa9..cb6e0397bec 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -143,7 +143,7 @@ static void __init parse_core(struct device_node *core, int core_id)
}
}
-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;
@@ -162,7 +162,7 @@ static void __init parse_cluster(struct device_node *cluster)
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++;
@@ -176,6 +176,10 @@ static void __init parse_cluster(struct device_node *cluster)
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
@@ -225,7 +229,7 @@ static void __init parse_dt_topology(void)
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;