Skip to content

Commit

Permalink
[CPUFREQ] _PPC frequency change issues
Browse files Browse the repository at this point in the history
BIOS might change frequency behind our back when BIOS changes allowed
frequencies via _PPC.  In this case cpufreq core got out of sync.
Ask driver for current freq and notify governors about a change

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Thomas Renninger authored and Dave Jones committed Jan 26, 2006
1 parent c70ca00 commit 0961dd0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,14 @@ int cpufreq_update_policy(unsigned int cpu)
policy.policy = data->user_policy.policy;
policy.governor = data->user_policy.governor;

/* BIOS might change freq behind our back
-> ask driver for current freq and notify governors about a change */
if (cpufreq_driver->get) {
policy.cur = cpufreq_driver->get(cpu);
if (data->cur != policy.cur)
cpufreq_out_of_sync(cpu, data->cur, policy.cur);
}

ret = __cpufreq_set_policy(data, &policy);

mutex_unlock(&data->lock);
Expand Down

0 comments on commit 0961dd0

Please sign in to comment.