From: Prarit Bhargava <prarit@redhat.com> Date: Mon, 15 Dec 2008 16:52:49 -0500 Subject: Revert: [i386]: check for dmi_data in powernow_k8 driver Message-id: 20081215215314.23268.59876.sendpatchset@prarit.bos.redhat.com O-Subject: [RHEL 5.3 XEN PATCH]: Revert xen changes to powernow-k8 module Bugzilla: 476184 RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: Bill Burns <bburns@redhat.com> Don't load the powernow-k8 module on Xen. A previous patch of mine changed this behavior because we thought that a later check was sufficient in catching cases where Xen failed. It turns out that the check wasn't correct, and powernow-k8 has been loading on Xen guests. Revert back to the original 5.2 behavior. Resolves BZ 476184. Successfully compiled and tested by Gurhan. diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index e478246..e7f9744 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -1416,6 +1416,13 @@ static int __cpuinit powernowk8_init(void) { unsigned int i, supported_cpus = 0; +#ifdef CONFIG_XEN + if (!is_initial_xendomain()) { + /* Xen PV domU's can't possibly do powersaving; bail */ + return -EPERM; + } +#endif + for_each_online_cpu(i) { if (check_supported_cpu(i)) supported_cpus++; @@ -1439,16 +1446,9 @@ static int __cpuinit powernowk8_init(void) if (preregister_acpi_perf == 1 && cpu_family == CPU_OPTERON) { char * dmi_data = dmi_get_system_info(DMI_BIOS_VENDOR); if (dmi_data && !strncmp(dmi_data, "Hewlett-Packard", 15)) { -#ifdef CONFIG_XEN - /* Disable cpufreq for HP AMD Opteron systems */ - printk("%s: This BIOS is %s .... disabling cpufreq " - "support\n", __FUNCTION__, dmi_data); - return -EPERM; -#else /* Disable preregistering ACPI data for HP AMD Opteron systems */ preregister_acpi_perf = 0; -#endif } }