summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-28 00:11:53 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-28 23:12:14 +0200
commit694cb173475a048a05daebf27cc8fdb7865c158b (patch)
tree8c447a2f29340a0da3bd9149ea80f0c3dde6b40b /drivers/cpufreq
parent7aec5b50e97dd3e2e6ad8a87ccfd62ba8f49a105 (diff)
downloadop-kernel-dev-694cb173475a048a05daebf27cc8fdb7865c158b.zip
op-kernel-dev-694cb173475a048a05daebf27cc8fdb7865c158b.tar.gz
cpufreq: intel_pstate: Skip unnecessary PID resets on init
PID controller parameters only need to be initialized if the get_target_pstate_use_performance() P-state selection routine is going to be used. It is not necessary to initialize them otherwise, so don't do that. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/intel_pstate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index b631ab0..ee61db9 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1911,12 +1911,12 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
intel_pstate_disable_ee(cpunum);
intel_pstate_hwp_enable(cpu);
+ } else if (pstate_funcs.get_target_pstate == get_target_pstate_use_performance) {
+ intel_pstate_pid_reset(cpu);
}
intel_pstate_get_cpu_pstates(cpu);
- intel_pstate_pid_reset(cpu);
-
pr_debug("controlling: cpu %d\n", cpunum);
return 0;
OpenPOWER on IntegriCloud