From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: [PATCH V2 5/6] cpufreq: Add compatibility hack to powernow-k8 Date: Fri, 17 Jun 2011 15:50:56 -0400 Message-ID: <1308340257-10117-5-git-send-email-mjg@redhat.com> References: <1308340257-10117-1-git-send-email-mjg@redhat.com> Return-path: In-Reply-To: <1308340257-10117-1-git-send-email-mjg@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org Cc: borislav.petkov@amd.com, davej@redhat.com, mark.langsdorf@amd.com, cpufreq@vger.kernel.org, andreas.herrmann3@amd.com, Matthew Garrett cpufreq modules are often loaded from init scripts that assume that all recent AMD systems will use powernow-k8, so we should ensure that loading it triggers a load of acpi-cpufreq if the latter is built as a module. This avoids the problem of users ending up without any cpufreq support after the transition. Signed-off-by: Matthew Garrett --- drivers/cpufreq/powernow-k8.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index 83479b6..8591ec8 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1545,8 +1545,12 @@ static int __cpuinit powernowk8_init(void) supported_cpus++; } - if (supported_cpus != num_online_cpus()) + if (supported_cpus != num_online_cpus()) { + if (cpu_has(0, X86_FEATURE_HW_PSTATE)) + request_module("acpi_cpufreq"); + return -ENODEV; + } printk(KERN_INFO PFX "Found %d %s (%d cpu cores) (" VERSION ")\n", num_online_nodes(), boot_cpu_data.x86_model_id, supported_cpus); -- 1.7.5.2