summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/intel_pstate.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2016-07-04 17:17:08 +0200
committerGreg Kroah-Hartman2016-07-04 17:17:08 +0200
commit67417f9c262e2cd4b706eba3e1fd879d0bebc6d8 (patch)
tree5ab867187357c4c0e23e409f42f0e0dff63d6fa8 /drivers/cpufreq/intel_pstate.c
parenttty/serial: atmel: enforce tasklet init and termination sequences (diff)
parentLinux 4.7-rc6 (diff)
downloadkernel-qcow2-linux-67417f9c262e2cd4b706eba3e1fd879d0bebc6d8.tar.gz
kernel-qcow2-linux-67417f9c262e2cd4b706eba3e1fd879d0bebc6d8.tar.xz
kernel-qcow2-linux-67417f9c262e2cd4b706eba3e1fd879d0bebc6d8.zip
Merge 4.7-rc6 into tty-next
We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r--drivers/cpufreq/intel_pstate.c5
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)
{
struct cpudata *cpu = all_cpu_data[cpu_num];
+ if (cpu->update_util_set)
+ return;
+
/* Prevent intel_pstate_update_util() from using stale data. */
cpu->sample.time = 0;
cpufreq_add_update_util_hook(cpu_num, &cpu->update_util,
@@ -1440,8 +1443,6 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
if (!policy->cpuinfo.max_freq)
return -ENODEV;
- intel_pstate_clear_update_util_hook(policy->cpu);
-
pr_debug("set_policy cpuinfo.max %u policy->max %u\n",
policy->cpuinfo.max_freq, policy->max);