All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Chazarain <guichaz@yahoo.fr>
To: Denis Sadykov <denis.m.sadykov@intel.com>,
	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	cpufreq@lists.linux.org.uk
Subject: [PATCH] Fix /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq with acpi-cpufreq and ondemand
Date: Tue, 02 Jan 2007 16:41:51 +0100	[thread overview]
Message-ID: <459A7D3F.60309@yahoo.fr> (raw)

[-- 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

             reply	other threads:[~2007-01-02 15:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-02 15:41 Guillaume Chazarain [this message]
2007-01-02 17:46 ` [PATCH] Fix /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq with acpi-cpufreq and ondemand Pallipadi, Venkatesh
2007-01-02 18:58   ` Guillaume Chazarain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=459A7D3F.60309@yahoo.fr \
    --to=guichaz@yahoo.fr \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=denis.m.sadykov@intel.com \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.