Skip to content

Commit

Permalink
powerpc/smp: Move topology fixups into a new function
Browse files Browse the repository at this point in the history
Move topology fixup based on the platform attributes into its own
function which is called just before set_sched_topology.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200810071834.92514-5-srikar@linux.vnet.ibm.com
  • Loading branch information
Srikar Dronamraju authored and Michael Ellerman committed Sep 16, 2020
1 parent 5e93f16 commit 3c6032a
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,16 @@ int setup_profiling_timer(unsigned int multiplier)
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)
{
/*
Expand All @@ -1376,12 +1386,7 @@ void __init smp_cpus_done(unsigned int max_cpus)

dump_numa_cpu_topology();

#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
fixup_topology();
set_sched_topology(powerpc_topology);
}

Expand Down

0 comments on commit 3c6032a

Please sign in to comment.