Enable small core scheduling as soon as we detect that we are in a
system that supports thread group. Doing so would avoid a redundant
check.

Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Cc: Michael Ellerman <micha...@au1.ibm.com>
Cc: Nick Piggin <npig...@au1.ibm.com>
Cc: Oliver OHalloran <olive...@au1.ibm.com>
Cc: Nathan Lynch <nath...@linux.ibm.com>
Cc: Michael Neuling <mi...@linux.ibm.com>
Cc: Anton Blanchard <an...@au1.ibm.com>
Cc: Gautham R Shenoy <e...@linux.vnet.ibm.com>
Cc: Vaidyanathan Srinivasan <sva...@linux.ibm.com>
Signed-off-by: Srikar Dronamraju <sri...@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/smp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 24529f6134aa..7d430fc536cc 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -892,6 +892,12 @@ static int init_big_cores(void)
        }
 
        has_big_cores = true;
+
+#ifdef CONFIG_SCHED_SMT
+       pr_info("Big cores detected. Using small core scheduling\n");
+       powerpc_topology[0].mask = smallcore_smt_mask;
+#endif
+
        return 0;
 }
 
@@ -1383,12 +1389,6 @@ 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
        set_sched_topology(powerpc_topology);
 }
 
-- 
2.17.1

Reply via email to