From: Rusty Russell <rusty@rustcorp.com.au>
To: Dave Jones <davej@redhat.com>
Cc: Dominik Brodowski <linux@brodo.de>,
dave.mueller@gmx.ch, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Fwd: [Bug 14340] New: speedstep-ich driver not working in 2.6.31
Date: Mon, 19 Oct 2009 14:18:21 +1030 [thread overview]
Message-ID: <200910191418.23238.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20091007201108.GA16813@redhat.com>
On Thu, 8 Oct 2009 06:41:08 am Dave Jones wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=14340
>
> Summary: speedstep-ich driver not working in 2.6.31
> Product: Power Management
> Version: 2.5
> Kernel Version: 2.6.31
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: cpufreq
> AssignedTo: cpufreq@vger.kernel.org
> ReportedBy: dave.mueller@gmx.ch
> Regression: Yes
>
>
> It looks like commit 394122ab144dae4b276d74644a2f11c44a60ac5c broke the
> speedstep-ich driver.
Indeed. And the patch in that bug report works, but is suboptimal: we no
longer need the struct at all. You may want to apply that to -stable and
this to -linus.
Subject: speedstep-ich: fix error caused by 394122ab144dae4b276d74644a2f11c44a60ac5c
"[CPUFREQ] cpumask: avoid playing with cpus_allowed in speedstep-ich.c"
changed the code to mistakenly pass the current cpu as the "processor"
argument of speedstep_get_frequency(), whereas it should be the type of
the processor.
(Based on patch by dave.mueller@gmx.ch, compile-tested only)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
To: Dave Jones <davej@redhat.com>
To: Dominik Brodowski <linux@brodo.de>
Cc: dave.mueller@gmx.ch
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
index 6911e91..3ae5a7a 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
@@ -232,28 +232,23 @@ static unsigned int speedstep_detect_chipset(void)
return 0;
}
-struct get_freq_data {
- unsigned int speed;
- unsigned int processor;
-};
-
-static void get_freq_data(void *_data)
+static void get_freq_data(void *_speed)
{
- struct get_freq_data *data = _data;
+ unsigned int *speed = _speed;
- data->speed = speedstep_get_frequency(data->processor);
+ *speed = speedstep_get_frequency(speedstep_processor);
}
static unsigned int speedstep_get(unsigned int cpu)
{
- struct get_freq_data data = { .processor = cpu };
+ unsigned int speed;
/* You're supposed to ensure CPU is online. */
- if (smp_call_function_single(cpu, get_freq_data, &data, 1) != 0)
+ if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0)
BUG();
- dprintk("detected %u kHz as current frequency\n", data.speed);
- return data.speed;
+ dprintk("detected %u kHz as current frequency\n", speed);
+ return speed;
}
/**
next parent reply other threads:[~2009-10-19 3:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091007201108.GA16813@redhat.com>
2009-10-19 3:48 ` Rusty Russell [this message]
2009-10-19 3:54 ` Fwd: [Bug 14340] New: speedstep-ich driver not working in 2.6.31 Andrew Morton
2009-10-19 5:03 ` [PATCH] cpufreq: use an enum for speedstep processor identification Rusty Russell
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=200910191418.23238.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=akpm@linux-foundation.org \
--cc=dave.mueller@gmx.ch \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@brodo.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox