From patchwork Fri Jan 18 19:06:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 2004011 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 24C7BDF280 for ; Fri, 18 Jan 2013 19:07:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753581Ab3ARTHI (ORCPT ); Fri, 18 Jan 2013 14:07:08 -0500 Received: from cavan.codon.org.uk ([93.93.128.6]:45164 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752770Ab3ARTHH (ORCPT ); Fri, 18 Jan 2013 14:07:07 -0500 Received: from mjg59 by cavan.codon.org.uk with local (Exim 4.72) (envelope-from ) id 1TwHHH-0004P8-4w; Fri, 18 Jan 2013 19:06:59 +0000 Date: Fri, 18 Jan 2013 19:06:59 +0000 From: Matthew Garrett To: Borislav Petkov , "Gopalakrishnan, Aravind" , "rjw@sisk.pl" , Andre Przywara , "cpufreq@vger.kernel.org" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Andreas Subject: Re: [PATCH] drivers/cpufreq: Warn user when powernow-k8 tries to fall back to acpi-cpufreq and it is unavailable. Message-ID: <20130118190659.GB16757@srcf.ucam.org> References: <1357780161-30581-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <20130111144940.GB21882@liondog.tnic> <20130111165054.GD10751@liondog.tnic> <4923C2DE085EEB4FAB1D375DD09D0BA6100CF170@sausexdag04.amd.com> <20130117115436.GA3853@pd.tnic> <20130118162347.GA31499@srcf.ucam.org> <20130118170755.GB4062@pd.tnic> <20130118190021.GD4062@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130118190021.GD4062@pd.tnic> User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@cavan.codon.org.uk X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Fri, Jan 18, 2013 at 08:00:21PM +0100, Borislav Petkov wrote: > ################################################################################## > # x86 drivers. > # Link order matters. K8 is preferred to ACPI because of firmware bugs in early > # K8 systems. > ... > > Great. :( The only case I can see this hitting would be if the platform is using system IO rather than fixed hardware functionality. Easiest thing to do there would be something like this: diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 0d048f6..8b466d5 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -762,6 +762,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) switch (perf->control_register.space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) { + pr_debug("Old AMD systems must use native drivers\n"); + result = -ENODEV; + goto err_unreg; + } pr_debug("SYSTEM IO addr space\n"); data->cpu_feature = SYSTEM_IO_CAPABLE; break;