summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-24 03:04:10 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-24 03:04:10 +0100
commitf1a91645b7f0896a12f91b57e1c6492fe137f85b (patch)
tree87a8b461aeb5df249c11608eccf7ba1280f3eb99
parentcpufreq: intel_pstate: Fix policy data management in passive mode (diff)
parentcpufreq: intel_pstate: Drop redundant wrapper function (diff)
downloadlinux-f1a91645b7f0896a12f91b57e1c6492fe137f85b.tar.xz
linux-f1a91645b7f0896a12f91b57e1c6492fe137f85b.zip
Merge back intel_pstate updates for 4.12.
-rw-r--r--drivers/cpufreq/intel_pstate.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 283491f742d3..815f5577b32a 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -922,14 +922,6 @@ skip_epp:
}
}
-static int intel_pstate_hwp_set_policy(struct cpufreq_policy *policy)
-{
- if (hwp_active)
- intel_pstate_hwp_set(policy);
-
- return 0;
-}
-
static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
{
struct cpudata *cpu_data = all_cpu_data[policy->cpu];
@@ -944,20 +936,17 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
static int intel_pstate_resume(struct cpufreq_policy *policy)
{
- int ret;
-
if (!hwp_active)
return 0;
mutex_lock(&intel_pstate_limits_lock);
all_cpu_data[policy->cpu]->epp_policy = 0;
-
- ret = intel_pstate_hwp_set_policy(policy);
+ intel_pstate_hwp_set(policy);
mutex_unlock(&intel_pstate_limits_lock);
- return ret;
+ return 0;
}
static void intel_pstate_update_policies(void)
@@ -2130,7 +2119,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
intel_pstate_set_update_util_hook(policy->cpu);
- intel_pstate_hwp_set_policy(policy);
+ if (hwp_active)
+ intel_pstate_hwp_set(policy);
mutex_unlock(&intel_pstate_limits_lock);