Update powernow.c to latest cpufreq code
PATCH 1/1 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 <[email protected]>
xen/arch/x86/acpi/cpufreq/cpufreq.c +5 -3
@@ -661,6 +661,9 @@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 @@/* 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;
xen/arch/x86/acpi/cpufreq/powernow.c +22 -42
106 lines not on this page · raw message
xen/include/acpi/cpufreq/processor_perf.h +1 -0
@@ -8,6 +8,7 @@int get_cpu_id (u8 );int powernow_cpufreq_init (void ); +unsigned int powernow_register_driver (void );void cpufreq_residency_update (unsigned int ,uint8_t );void cpufreq_statistic_update (unsigned int ,uint8_t ,uint8_t );
-------------------------------------------------------