Skip to content

Commit 345b28c

Browse files
rafaeljwgregkh
authored andcommitted
cpufreq: Avoid configuring old governors as default with intel_pstate
commit db86527 upstream. Commit 33aa46f ("cpufreq: intel_pstate: Use passive mode by default without HWP") was meant to cause intel_pstate to be used in the passive mode with the schedutil governor on top of it, but it missed the case in which either "ondemand" or "conservative" was selected as the default governor in the existing kernel config, in which case the previous old governor configuration would be used, causing the default legacy governor to be used on top of intel_pstate instead of schedutil. Address this by preventing "ondemand" and "conservative" from being configured as the default cpufreq governor in the case when schedutil is the default choice for the default governor setting. [Note that the default cpufreq governor can still be set via the kernel command line if need be and that choice is not limited, so if anyone really wants to use one of the legacy governors by default, it can be achieved this way.] Fixes: 33aa46f ("cpufreq: intel_pstate: Use passive mode by default without HWP") Reported-by: Julia Lawall <julia.lawall@inria.fr> Cc: 5.8+ <stable@vger.kernel.org> # 5.8+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2b583ef commit 345b28c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/cpufreq/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE
7171

7272
config CPU_FREQ_DEFAULT_GOV_ONDEMAND
7373
bool "ondemand"
74+
depends on !(X86_INTEL_PSTATE && SMP)
7475
select CPU_FREQ_GOV_ONDEMAND
7576
select CPU_FREQ_GOV_PERFORMANCE
7677
help
@@ -83,6 +84,7 @@ config CPU_FREQ_DEFAULT_GOV_ONDEMAND
8384

8485
config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
8586
bool "conservative"
87+
depends on !(X86_INTEL_PSTATE && SMP)
8688
select CPU_FREQ_GOV_CONSERVATIVE
8789
select CPU_FREQ_GOV_PERFORMANCE
8890
help

0 commit comments

Comments
 (0)