aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-07 18:41:49 +0000
committerMark Brown <broonie@linaro.org>2014-01-08 12:15:57 +0000
commitcc347206daf808c86ced0ce3136313c78f1beeb5 (patch)
tree3958436df54fa6422a469dfc365a68c4264d89e3
parentae96e26a8340085c5bc0655defd570a4fa08361d (diff)
arm64: topology: Warn if the root node contains CPUs directlyv3.10/topic/arm64-topology
Signed-off-by: Mark Brown <broonie@linaro.org>
-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;