diff options
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index fe9dc17ea873..1fa1a32928d7 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -1400,6 +1400,9 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num) | |||
1400 | { | 1400 | { |
1401 | struct cpudata *cpu = all_cpu_data[cpu_num]; | 1401 | struct cpudata *cpu = all_cpu_data[cpu_num]; |
1402 | 1402 | ||
1403 | if (cpu->update_util_set) | ||
1404 | return; | ||
1405 | |||
1403 | /* Prevent intel_pstate_update_util() from using stale data. */ | 1406 | /* Prevent intel_pstate_update_util() from using stale data. */ |
1404 | cpu->sample.time = 0; | 1407 | cpu->sample.time = 0; |
1405 | cpufreq_add_update_util_hook(cpu_num, &cpu->update_util, | 1408 | cpufreq_add_update_util_hook(cpu_num, &cpu->update_util, |
@@ -1440,8 +1443,6 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
1440 | if (!policy->cpuinfo.max_freq) | 1443 | if (!policy->cpuinfo.max_freq) |
1441 | return -ENODEV; | 1444 | return -ENODEV; |
1442 | 1445 | ||
1443 | intel_pstate_clear_update_util_hook(policy->cpu); | ||
1444 | |||
1445 | pr_debug("set_policy cpuinfo.max %u policy->max %u\n", | 1446 | pr_debug("set_policy cpuinfo.max %u policy->max %u\n", |
1446 | policy->cpuinfo.max_freq, policy->max); | 1447 | policy->cpuinfo.max_freq, policy->max); |
1447 | 1448 | ||