diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-23 22:04:10 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-23 22:04:10 -0400 |
commit | f1a91645b7f0896a12f91b57e1c6492fe137f85b (patch) | |
tree | 87a8b461aeb5df249c11608eccf7ba1280f3eb99 | |
parent | 64897b20eed29cee2b998fb5ba362e65523dba3c (diff) | |
parent | 5f98ced1c95e7706af6895f7b7b0d2216f075d59 (diff) |
Merge back intel_pstate updates for 4.12.
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 18 |
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: | |||
922 | } | 922 | } |
923 | } | 923 | } |
924 | 924 | ||
925 | static int intel_pstate_hwp_set_policy(struct cpufreq_policy *policy) | ||
926 | { | ||
927 | if (hwp_active) | ||
928 | intel_pstate_hwp_set(policy); | ||
929 | |||
930 | return 0; | ||
931 | } | ||
932 | |||
933 | static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy) | 925 | static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy) |
934 | { | 926 | { |
935 | struct cpudata *cpu_data = all_cpu_data[policy->cpu]; | 927 | struct cpudata *cpu_data = all_cpu_data[policy->cpu]; |
@@ -944,20 +936,17 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy) | |||
944 | 936 | ||
945 | static int intel_pstate_resume(struct cpufreq_policy *policy) | 937 | static int intel_pstate_resume(struct cpufreq_policy *policy) |
946 | { | 938 | { |
947 | int ret; | ||
948 | |||
949 | if (!hwp_active) | 939 | if (!hwp_active) |
950 | return 0; | 940 | return 0; |
951 | 941 | ||
952 | mutex_lock(&intel_pstate_limits_lock); | 942 | mutex_lock(&intel_pstate_limits_lock); |
953 | 943 | ||
954 | all_cpu_data[policy->cpu]->epp_policy = 0; | 944 | all_cpu_data[policy->cpu]->epp_policy = 0; |
955 | 945 | intel_pstate_hwp_set(policy); | |
956 | ret = intel_pstate_hwp_set_policy(policy); | ||
957 | 946 | ||
958 | mutex_unlock(&intel_pstate_limits_lock); | 947 | mutex_unlock(&intel_pstate_limits_lock); |
959 | 948 | ||
960 | return ret; | 949 | return 0; |
961 | } | 950 | } |
962 | 951 | ||
963 | static void intel_pstate_update_policies(void) | 952 | static void intel_pstate_update_policies(void) |
@@ -2130,7 +2119,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
2130 | 2119 | ||
2131 | intel_pstate_set_update_util_hook(policy->cpu); | 2120 | intel_pstate_set_update_util_hook(policy->cpu); |
2132 | 2121 | ||
2133 | intel_pstate_hwp_set_policy(policy); | 2122 | if (hwp_active) |
2123 | intel_pstate_hwp_set(policy); | ||
2134 | 2124 | ||
2135 | mutex_unlock(&intel_pstate_limits_lock); | 2125 | mutex_unlock(&intel_pstate_limits_lock); |
2136 | 2126 | ||