AMD PowerNow! in the Hypervisor (dom0 changes)
PATCH 1/2 AMD PowerNow! in the Hypervisor (dom0 changes)
This patch set moves support for AMD's PowerNow! technology from dom0 into the hypervisor, now that there is support for transferring ACPI data to the hypervisor. It will only work for AMD processors that support the architectural P-state driver, such as 3rd generation Opterons, Phenoms, and Turion Ultras.
This patch guarantees that the previous dom0 PowerNow! controller will not instantiate if the hypervisor PowerNow! controller is enabled.
It should apply to current linux-2.6-xen.hg.
-Mark Langsdorf
Operating System Research Center
AMD
Signed-off-by Mark Langsdorf <[email protected]>
Acked-by Conny Seidel <[email protected]>
drivers/acpi/processor_extcntl.c +1 -0
@@ -37,6 +37,7 @@ static int processor_extcntl_get_perform* ops to get ACPI related notification. One example is like VMM. */ struct processor_extcntl_ops *processor_extcntl_ops; +EXPORT_SYMBOL (processor_extcntl_ops);static int processor_notify_smm (void ) {
arch/i386/kernel/cpu/cpufreq/powernow-k8.c +10 -0
@@ -1312,6 +1312,16 @@ static int __cpuinit powernowk8_init(voi {unsigned int i, supported_cpus =0 ; +#ifdef CONFIG_XEN +/* +* This effectively blocks in-kernel cpufreq driver to interfere +* external control logic +*/ +if (processor_pmperf_external ()) { +return -ENODEV ; + } +#endif /* CONFIG_XEN */ +for_each_online_cpu (i) {if (check_supported_cpu (i)) supported_cpus++;