From: Thomas Renninger Date: Thu, 26 Jan 2006 17:46:33 +0000 (+0100) Subject: [CPUFREQ] _PPC frequency change issues X-Git-Tag: firefly_0821_release~38049^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0961dd0d217d072df736d964f47c2b6600931e19;p=firefly-linux-kernel-4.4.55.git [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 0a6c4c8642e7..7a511479ae29 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);