arm64: topology: Correct handling of thread zero in DT parsing
authorMark Brown <broonie@linaro.org>
Tue, 17 Dec 2013 19:20:40 +0000 (19:20 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 17 Dec 2013 20:04:50 +0000 (20:04 +0000)
Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/kernel/topology.c

index 8828e0bfc328b8f87123398caf5dbe826a3598e0..f9ffa81b3817e29f37b3b1102b0c26d091f81f73 100644 (file)
@@ -115,7 +115,7 @@ static void __init parse_core(struct device_node *core, int core_id)
                if (t) {
                        leaf = false;
                        cpu = get_cpu_for_node(t);
-                       if (cpu) {
+                       if (cpu >= 0) {
                                pr_info("CPU%d: socket %d core %d thread %d\n",
                                        cpu, cluster_id, core_id, i);
                                cpu_topology[cpu].socket_id = cluster_id;