summaryrefslogtreecommitdiff
path: root/xen/arch/x86/acpi/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-10-16 08:31:39 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-10-16 08:31:39 +0100
commit555a0408d2fdee58a0e400e8d68fdc9fdaa4e2ea (patch)
treedc6168a4ac6bb6e68c1def1729bd4dd830dc7d43 /xen/arch/x86/acpi/cpufreq/cpufreq.c
parent6edd9aaf782b201534d278f943de23734134d9f6 (diff)
x86: Update powernow.c to latest cpufreq code
The general cpufreq infrastructure has been improved over the last year. Update the AMD PowerNow! driver powernow.c to take advantage of those improvements. Specifically, addresses Novell bugzilla # 530035. Signed-of-by: Mark Langsdorf <mark.langsdorf@amd.com>
Diffstat (limited to 'xen/arch/x86/acpi/cpufreq/cpufreq.c')
-rw-r--r--xen/arch/x86/acpi/cpufreq/cpufreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index 8408f1669e..643fad7550 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -661,6 +661,9 @@ static int __init cpufreq_driver_init(void)
if ((cpufreq_controller == FREQCTL_xen) &&
(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))
ret = cpufreq_register_driver(&acpi_cpufreq_driver);
+ else if ((cpufreq_controller == FREQCTL_xen) &&
+ (boot_cpu_data.x86_vendor == X86_VENDOR_AMD))
+ ret = powernow_register_driver();
return ret;
}
@@ -676,9 +679,8 @@ int cpufreq_cpu_init(unsigned int cpuid)
/* Currently we only handle Intel and AMD processor */
if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
ret = cpufreq_add_cpu(cpuid);
- else if ( (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
- (cpu_count == num_online_cpus()) )
- ret = powernow_cpufreq_init();
+ else if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
+ ret = cpufreq_add_cpu(cpuid);
else
ret = -EFAULT;
return ret;