From: Mark Brown Date: Tue, 25 Feb 2014 02:45:16 +0000 (+0900) Subject: arm64: topology: Place all unknown CPUs in a cluster X-Git-Tag: firefly_0821_release~3680^2~158^2~2^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa9b724c7e84c61d733f852a34cbbf3674a0c555;p=firefly-linux-kernel-4.4.55.git arm64: topology: Place all unknown CPUs in a cluster The scheduler gets confused if CPUs are not part of the topology when topology is enabled so assign any otherwise unassigned CPUs to a cluster after we have finished parsing. Signed-off-by: Mark Brown --- diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index cb6e0397bec7..616fe0531536 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -387,4 +387,17 @@ void __init init_cpu_topology(void) smp_wmb(); parse_dt_topology(); + + /* + * Assign all remaining CPUs to a cluster so the scheduler + * doesn't get confused. + */ + for_each_possible_cpu(cpu) { + struct cputopo_arm *cpu_topo = &cpu_topology[cpu]; + + if (cpu_topo->socket_id == -1) { + cpu_topo->socket_id = INT_MAX; + cpu_topo->core_id = cpu; + } + } }