Skip to content

Commit

Permalink
Merge back intel_pstate updates for 4.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael J. Wysocki committed Mar 24, 2017
2 parents 64897b2 + 5f98ced commit f1a9164
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,14 +922,6 @@ static void intel_pstate_hwp_set(struct cpufreq_policy *policy)
}
}

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];
Expand All @@ -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)
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit f1a9164

Please sign in to comment.