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 <[email protected]>
---
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]