* [patch]cpufreq state info wrong after resume
@ 2008-04-23 9:21 Shaohua Li
0 siblings, 0 replies; only message in thread
From: Shaohua Li @ 2008-04-23 9:21 UTC (permalink / raw)
To: lkml; +Cc: Andrew Morton, Pallipadi, Venkatesh
Sometimes old_index != stat->last_index, see cpufreq_update_policy, bios
can change cpu setting in resume. In my test, after resume cpu is in
lowest speed, but the stat info shows cpu is in full speed. This patch
makes the stat info correct after a resume.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 070421a..78bd2f3 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -284,7 +284,7 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val,
if (!stat)
return 0;
- old_index = freq_table_get_index(stat, freq->old);
+ old_index = stat->last_index;
new_index = freq_table_get_index(stat, freq->new);
cpufreq_stats_update(freq->cpu);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-23 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-23 9:21 [patch]cpufreq state info wrong after resume Shaohua Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®