Message ID | 20200412032123.3896114-5-jiaxun.yang@flygoat.com |
---|---|
State | New |
Headers | show |
Series | [v2,01/11] MIPS: setup: Drop prefill_possible_map | expand |
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 13dc4fbf043f..e7912d0a875e 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -536,7 +536,7 @@ void __init reset_cpu_topology(void) { unsigned int cpu; - for_each_possible_cpu(cpu) { + for (cpu = 0; cpu < ARRAY_SIZE(cpu_topology); cpu++) { struct cpu_topology *cpu_topo = &cpu_topology[cpu]; cpu_topo->thread_id = -1;
For MIPS platform, when topology isn't probed by DeviceTree, possible_cpu might be empty when calling init_cpu_topology, that may result cpu_topology not fully reseted for all CPUs. So here we can reset all cpus instead of possible cpus. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> -- v2: Use ARRAY_SIZE instead of NR_CPUS. --- drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)