[PATCH 1/2] cpufreq: Register governors at core_initcall
Viresh Kumar
viresh.kumar at linaro.org
Tue Jun 16 14:28:31 AEST 2020
On 15-06-20, 17:55, Quentin Perret wrote:
> Currently, most CPUFreq governors are registered at core_initcall time
> when used as default, and module_init otherwise. In preparation for
> letting users specify the default governor on the kernel command line,
> change all of them to use core_initcall unconditionally, as is already
> the case for schedutil and performance. This will enable us to assume
> builtin governors have been registered before the builtin CPUFreq
> drivers probe.
>
> And since all governors now have similar init/exit patterns, introduce
> two new macros cpufreq_governor_{init,exit}() to factorize the code.
>
> Signed-off-by: Quentin Perret <qperret at google.com>
> ---
> Note: I couldn't boot-test the change to spudemand, by lack of hardware.
> But I can confirm cell_defconfig compiles just fine.
> ---
> .../platforms/cell/cpufreq_spudemand.c | 26 ++-----------------
> drivers/cpufreq/cpufreq_conservative.c | 22 ++++------------
> drivers/cpufreq/cpufreq_ondemand.c | 24 +++++------------
> drivers/cpufreq/cpufreq_performance.c | 14 ++--------
> drivers/cpufreq/cpufreq_powersave.c | 18 +++----------
> drivers/cpufreq/cpufreq_userspace.c | 18 +++----------
> include/linux/cpufreq.h | 14 ++++++++++
> kernel/sched/cpufreq_schedutil.c | 6 +----
> 8 files changed, 36 insertions(+), 106 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar at linaro.org>
--
viresh
More information about the Linuxppc-dev
mailing list