Fix /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq with acpi-cpufreq and ondemand
PATCH 1/1 Fix /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq with acpi-cpufreq and ondemand
Hi,
This is 2.6.20 material I think.
Signature · 1 line
Guillaume
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.
---
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +1 -1
@@ -440,7 +440,7 @@ static int acpi_cpufreq_target(struct cpcpu_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 );
_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq
Hi,
This issue has been fixed in an earlier patch which is in mm right now
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/broken-out/git-cpufreq.patch
[CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on
frequency change notification
Can you please check with 2.6.20-rc2-mm1 and report if there are any issues with that kernel.
Thanks,
Venki
Quoted 16 lines
-----Original Message-----
From: Guillaume Chazarain [mailto:[email protected]]
Sent: Tuesday, January 02, 2007 7:42 AM
To: Sadykov, Denis M; Pallipadi, Venkatesh; [email protected]
Subject: [PATCH] Fix/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freqwith acpi-cpufreq and ondemandHi,
This is 2.6.20 material I think.
Signature · 1 line
Guillaume
Quoted 3 lines · Venkatesh
Can you please check with 2.6.20-rc2-mm1 and report if there are any issues with that kernel.
Thank you for the notice. 2.6.20-rc2-mm1 works fine.
Regards.
Signature · 1 line
Guillaume