Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Quentin Perret
On Tuesday 16 Jun 2020 at 15:24:38 (+0530), Viresh Kumar wrote: > On 16-06-20, 10:48, Quentin Perret wrote: > > ---8<--- > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > index 0f05caedc320..a9219404e07f 100644 > > --- a/drivers/cpufreq/cpufreq.c > > +++

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Viresh Kumar
On 16-06-20, 10:48, Quentin Perret wrote: > ---8<--- > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 0f05caedc320..a9219404e07f 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2340,6 +2340,11 @@ int cpufreq_register_governor(struct

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Quentin Perret
On Tuesday 16 Jun 2020 at 14:57:59 (+0530), Viresh Kumar wrote: > There is another problem here which we need to look at. Any governor > which is built as a module and isn't currently used, should be allowed > to unload. And this needs to be tested by you as well, should be easy > enough. > >

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Viresh Kumar
On 16-06-20, 09:31, Quentin Perret wrote: > Right, so the reason I avoided cpufreq_core_init() was because it is > called at core_initcall() time, which means I can't really assume the > governors have been loaded by that time. By waiting for the driver to > probe before detecting the default gov,

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Quentin Perret
Hey Viresh, On Tuesday 16 Jun 2020 at 10:01:43 (+0530), Viresh Kumar wrote: > On 15-06-20, 17:55, Quentin Perret wrote: > > +static void cpufreq_get_default_governor(void) > > +{ > > + default_governor = cpufreq_parse_governor(cpufreq_param_governor); > > + if (!default_governor) { > > +

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-15 Thread Viresh Kumar
On 15-06-20, 17:55, Quentin Perret wrote: > +static void cpufreq_get_default_governor(void) > +{ > + default_governor = cpufreq_parse_governor(cpufreq_param_governor); > + if (!default_governor) { > + if (*cpufreq_param_governor) > + pr_warn("Failed to find

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-15 Thread Quentin Perret
On Monday 15 Jun 2020 at 17:55:54 (+0100), Quentin Perret wrote: > static int cpufreq_init_governor(struct cpufreq_policy *policy) > { > int ret; > @@ -2701,6 +2721,8 @@ int cpufreq_register_driver(struct cpufreq_driver > *driver_data) > > if (driver_data->setpolicy) >

[PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-15 Thread Quentin Perret
Currently, the only way to specify the default CPUfreq governor is via Kconfig options, which suits users who can build the kernel themselves perfectly. However, for those who use a distro-like kernel (such as Android, with the Generic Kernel Image project), the only way to use a different