Commit 3c6032a8 authored by Srikar Dronamraju's avatar Srikar Dronamraju Committed by Michael Ellerman

powerpc/smp: Move topology fixups into a new function

Move topology fixup based on the platform attributes into its own
function which is called just before set_sched_topology.
Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Reviewed-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200810071834.92514-5-srikar@linux.vnet.ibm.com
parent 5e93f16a
...@@ -1363,6 +1363,16 @@ int setup_profiling_timer(unsigned int multiplier) ...@@ -1363,6 +1363,16 @@ int setup_profiling_timer(unsigned int multiplier)
return 0; return 0;
} }
static void fixup_topology(void)
{
#ifdef CONFIG_SCHED_SMT
if (has_big_cores) {
pr_info("Big cores detected but using small core scheduling\n");
powerpc_topology[0].mask = smallcore_smt_mask;
}
#endif
}
void __init smp_cpus_done(unsigned int max_cpus) void __init smp_cpus_done(unsigned int max_cpus)
{ {
/* /*
...@@ -1376,12 +1386,7 @@ void __init smp_cpus_done(unsigned int max_cpus) ...@@ -1376,12 +1386,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
dump_numa_cpu_topology(); dump_numa_cpu_topology();
#ifdef CONFIG_SCHED_SMT fixup_topology();
if (has_big_cores) {
pr_info("Big cores detected but using small core scheduling\n");
powerpc_topology[0].mask = smallcore_smt_mask;
}
#endif
set_sched_topology(powerpc_topology); set_sched_topology(powerpc_topology);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment