On Tue, Jul 14, 2020 at 10:06:24AM +0530, Srikar Dronamraju wrote: > If user wants to enable coregroup sched_domain then they can boot with > kernel parameter "coregroup_support=on" > > 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>
We need this documented in the Documentation/admin-guide/kernel-parameters.txt Other than that, the patch looks good to me. Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> > --- > arch/powerpc/kernel/smp.c | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index bb25c13bbb79..c43909e6e8e9 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -118,6 +118,23 @@ struct smp_ops_t *smp_ops; > volatile unsigned int cpu_callin_map[NR_CPUS]; > > int smt_enabled_at_boot = 1; > +int coregroup_support; > + > +static int __init early_coregroup(char *p) > +{ > + if (!p) > + return 0; > + > + if (strstr(p, "on")) > + coregroup_support = 1; > + > + if (strstr(p, "1")) > + coregroup_support = 1; > + > + return 0; > +} > + > +early_param("coregroup_support", early_coregroup); > > /* > * Returns 1 if the specified cpu should be brought up during boot. > @@ -878,7 +895,7 @@ static struct cpumask *cpu_coregroup_mask(int cpu) > > static bool has_coregroup_support(void) > { > - return coregroup_enabled; > + return coregroup_enabled && coregroup_support; > } > > static const struct cpumask *cpu_mc_mask(int cpu) > -- > 2.17.1 >