Skip to content

Commit

Permalink
arm64: topology: Initialise default topology state immediately
Browse files Browse the repository at this point in the history
As a legacy of the way 32 bit ARM did things the topology code uses a null
topology map by default and then overwrites it by mapping cores with no
information to a cluster by themselves later. In order to make it simpler
to reset things as part of recovering from parse failures in firmware
information directly set this configuration on init. A core will always be
its own sibling so there should be no risk of confusion with firmware
provided information.

Change-Id: Ibaa83b2c2fe624b75d82fcb15e91e68eecedf48f
Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Patch-mainline: linux-arm-kernel 5/2/2014, 20:38
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
  • Loading branch information
broonie authored and Rohit Vaswani committed May 13, 2014
1 parent 1cbe5cf commit a329b46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/arm64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ static void update_siblings_masks(unsigned int cpuid)
* reset it to default behaviour
*/
pr_debug("CPU%u: No topology information configured\n", cpuid);
cpuid_topo->core_id = 0;
cpumask_set_cpu(cpuid, &cpuid_topo->core_sibling);
cpumask_set_cpu(cpuid, &cpuid_topo->thread_sibling);
return;
}

Expand Down Expand Up @@ -87,9 +84,12 @@ void __init init_cpu_topology(void)
struct cpu_topology *cpu_topo = &cpu_topology[cpu];

cpu_topo->thread_id = -1;
cpu_topo->core_id = -1;
cpu_topo->core_id = 0;
cpu_topo->cluster_id = -1;

cpumask_clear(&cpu_topo->core_sibling);
cpumask_set_cpu(cpu, &cpu_topo->core_sibling);
cpumask_clear(&cpu_topo->thread_sibling);
cpumask_set_cpu(cpu, &cpu_topo->thread_sibling);
}
}

0 comments on commit a329b46

Please sign in to comment.