Skip to content

Commit f1a9164

Browse files
committed
Merge back intel_pstate updates for 4.12.
2 parents 64897b2 + 5f98ced commit f1a9164

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -922,14 +922,6 @@ static void intel_pstate_hwp_set(struct cpufreq_policy *policy)
922922
}
923923
}
924924

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-
933925
static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
934926
{
935927
struct cpudata *cpu_data = all_cpu_data[policy->cpu];
@@ -944,20 +936,17 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
944936

945937
static int intel_pstate_resume(struct cpufreq_policy *policy)
946938
{
947-
int ret;
948-
949939
if (!hwp_active)
950940
return 0;
951941

952942
mutex_lock(&intel_pstate_limits_lock);
953943

954944
all_cpu_data[policy->cpu]->epp_policy = 0;
955-
956-
ret = intel_pstate_hwp_set_policy(policy);
945+
intel_pstate_hwp_set(policy);
957946

958947
mutex_unlock(&intel_pstate_limits_lock);
959948

960-
return ret;
949+
return 0;
961950
}
962951

963952
static void intel_pstate_update_policies(void)
@@ -2130,7 +2119,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
21302119

21312120
intel_pstate_set_update_util_hook(policy->cpu);
21322121

2133-
intel_pstate_hwp_set_policy(policy);
2122+
if (hwp_active)
2123+
intel_pstate_hwp_set(policy);
21342124

21352125
mutex_unlock(&intel_pstate_limits_lock);
21362126

0 commit comments

Comments
 (0)