All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq with acpi-cpufreq and ondemand
@ 2007-01-02 15:41 Guillaume Chazarain
  2007-01-02 17:46 ` Pallipadi, Venkatesh
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Chazarain @ 2007-01-02 15:41 UTC (permalink / raw)
  To: Denis Sadykov, Venkatesh Pallipadi, cpufreq

[-- Attachment #1: Type: text/plain, Size: 54 bytes --]

Hi,

This is 2.6.20 material I think.

-- 
Guillaume


[-- Attachment #2: cpufreq-fix-acpi-ondemand-scaling_cur_freq --]
[-- Type: text/plain, Size: 1116 bytes --]

As of linux-2.6.20-rc2 using acpi-cpufreq and ondemand on my Pentium M
(Asus V6VA laptop) seems broken.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq contains most of
the time 1, sometimes the actual frequency or (rarely) some random value.

The problem seems to come from
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7650b281b091f39f5e97f13b45ab3813b1526b65

The attached patch fixes the problem for me. 

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
---

diff -r 5b8ceb2c0e06 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c	Mon Jan 01 13:10:08 2007 +0100
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c	Mon Jan 01 16:23:04 2007 +0100
@@ -440,7 +440,7 @@ static int acpi_cpufreq_target(struct cp
 		cpu_set(policy->cpu, cmd.mask);
 
 	freqs.old = data->freq_table[perf->state].frequency;
-	freqs.new = data->freq_table[next_perf_state].frequency;
+	freqs.new = data->freq_table[next_state].frequency;
 	for_each_cpu_mask(i, cmd.mask) {
 		freqs.cpu = i;
 		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);

[-- Attachment #3: Type: text/plain, Size: 147 bytes --]

_______________________________________________
Cpufreq mailing list
Cpufreq@lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-02 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02 15:41 [PATCH] Fix /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq with acpi-cpufreq and ondemand Guillaume Chazarain
2007-01-02 17:46 ` Pallipadi, Venkatesh
2007-01-02 18:58   ` Guillaume Chazarain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.