From: Thomas Renninger Date: Thu, 26 Jan 2006 17:46:33 +0000 (+0100) Subject: [CPUFREQ] _PPC frequency change issues X-Git-Tag: v2.6.16-rc2~240^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0961dd0d217d072df736d964f47c2b6600931e19;p=linux-2.6 [CPUFREQ] _PPC frequency change issues 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 Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dave Jones --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 0a6c4c8642..7a511479ae 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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);