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 <broonie@linaro.org>
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;
+ }
+ }
}