[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1208942473.6630.2.camel@sli10-desk.sh.intel.com>
Date: Wed, 23 Apr 2008 17:21:13 +0800
From: Shaohua Li <shaohua.li@...el.com>
To: lkml <linux-kernel@...r.kernel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>
Subject: [patch]cpufreq state info wrong after resume
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@...el.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists