From: Ben Collins <bcollins@ubuntu.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 03/15] powernow-k7: Work when kernel is compiled for SMP
Date: Wed, 04 Jan 2006 16:59:31 -0500 [thread overview]
Message-ID: <0ISL00NU693O1L@a34-mta01.direcway.com> (raw)
On a UP system with SMP compiled kernel, the powernow-k7 module would not
initialize (returned -ENODEV). Not sure why policy->cpu != 0 for UP
systems, but since policy->cpu isn't used anywhere, just check for
num_cpus in the system, and fail of it's > 1.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
---
arch/i386/kernel/cpu/cpufreq/powernow-k7.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
a1418b50daac86ff02e0d7a4cba6185a452ca393
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
index edcd626..a9c4970 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -576,9 +576,6 @@ static int __init powernow_cpu_init (str
union msr_fidvidstatus fidvidstatus;
int result;
- if (policy->cpu != 0)
- return -ENODEV;
-
rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
/* recalibrate cpu_khz */
@@ -664,8 +661,13 @@ static struct cpufreq_driver powernow_dr
static int __init powernow_init (void)
{
- if (check_powernow()==0)
+ /* Does not support multi-cpu systems */
+ if (num_online_cpus() != 1 || num_possible_cpus() != 1)
return -ENODEV;
+
+ if (check_powernow() == 0)
+ return -ENODEV;
+
return cpufreq_register_driver(&powernow_driver);
}
--
1.0.5
next reply other threads:[~2006-01-04 22:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 21:59 Ben Collins [this message]
2006-01-04 22:26 ` Dominik Brodowski
2006-01-04 22:32 ` Ben Collins
2006-01-05 22:32 ` Dominik Brodowski
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=0ISL00NU693O1L@a34-mta01.direcway.com \
--to=bcollins@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®