lkml.org 
[lkml]   [2020]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] cpufreq: Register governors at core_initcall
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@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@linaro.org>

--
viresh

\
 
 \ /
  Last update: 2020-06-16 06:29    [W:0.106 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site