From: Srinivas Pandruvada Date: Fri, 21 Oct 2016 16:38:20 +0000 (-0700) Subject: cpufreq: intel_pstate: Remove PID debugfs when not used X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~8844^2~3^2~43^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=185d82456edaa5a7a8c8827840b8a675c60579c0;p=mirror_ubuntu-focal-kernel.git cpufreq: intel_pstate: Remove PID debugfs when not used When target state is calculated using get_target_pstate_use_cpu_load(), PID controller is not used, hence it has no effect on performance. So don't present debugfs entries to tune PID controller. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 16d071a618b7..d46e881ff4d7 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -636,8 +636,10 @@ static void __init intel_pstate_debug_expose_params(void) struct dentry *debugfs_parent; int i = 0; - if (hwp_active) + if (hwp_active || + pstate_funcs.get_target_pstate == get_target_pstate_use_cpu_load) return; + debugfs_parent = debugfs_create_dir("pstate_snb", NULL); if (IS_ERR_OR_NULL(debugfs_parent)) return;