diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 13:47:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 13:47:21 -0700 |
commit | 7f6c69dcf40a227b8c98e5619367269b427164d7 (patch) | |
tree | 416b47150be16466ed88bb4f6e4abdc1fad7754c /arch | |
parent | 1e5ad9a3b9b78767a2eb1345201e46f41f9457ef (diff) | |
parent | e56a727b023d40d1adf660168883f30f2e6abe0a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Make acpi-cpufreq more robust against BIOS freq changes behind our back.
[CPUFREQ] change cpu freq tables to per_cpu variables
[CPUFREQ] fix show_trans_table
[CPUFREQ] Warn when cpufreq_register_notifier called before pure initcalls
[CPUFREQ] Refactor locking in cpufreq_add_dev
[CPUFREQ] more CodingStyle
[CPUFREQ] CodingStyle
[CPUFREQ] Slightly shorten the error paths of cpufreq_suspend/cpufreq_resume
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index e2d870de837..8db8f73503b 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -339,6 +339,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) { struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); unsigned int freq; + unsigned int cached_freq; dprintk("get_cur_freq_on_cpu (%d)\n", cpu); @@ -347,7 +348,16 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) return 0; } + cached_freq = data->freq_table[data->acpi_data->state].frequency; freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data); + if (freq != cached_freq) { + /* + * The dreaded BIOS frequency change behind our back. + * Force set the frequency on next target call. + */ + data->resume = 1; + } + dprintk("cur freq = %u\n", freq); return freq; |