Skip to content

Commit

Permalink
[CPUFREQ] state info wrong after resume
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Shaohua Li authored and Dave Jones committed Apr 28, 2008
1 parent 30d221d commit 6501faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,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);
Expand Down

0 comments on commit 6501faf

Please sign in to comment.