[patch 22/45] Make powernow-k7 work on SMP kernels.

Greg KH
2006-07-17T16:34:09Z

[-- Attachment #1: make-powernow-k7-work-on-smp-kernels.patch --]
[-- Type: text/plain, Size: 1072 bytes --]

-stable review patch. If anyone has any objections, please let us know.

------------------
From: Dave Jones <davej@redhat.com>

[CPUFREQ] Make powernow-k7 work on SMP kernels.
Even though powernow-k7 doesn't work in SMP environments,
it can work on an SMP configured kernel if there's only
one CPU present, however recalibrate_cpu_khz was returning
-EINVAL on such kernels, so we failed to init the cpufreq driver.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
arch/i386/kernel/cpu/cpufreq/powernow-k7.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

--- linux-2.6.17.4.orig/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ linux-2.6.17.4/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -581,10 +581,7 @@ static int __init powernow_cpu_init (str

rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);

- /* recalibrate cpu_khz */
- result = recalibrate_cpu_khz();
- if (result)
- return result;
+ recalibrate_cpu_khz();

fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID];
if (!fsb) {

--