From patchwork Sun Jan 20 10:24:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 2008091 Return-Path: X-Original-To: patchwork-linux-acpi@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 4254FDF264 for ; Sun, 20 Jan 2013 10:26:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620Ab3ATK0J (ORCPT ); Sun, 20 Jan 2013 05:26:09 -0500 Received: from mail.skyhub.de ([78.46.96.112]:41416 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751672Ab3ATKYj (ORCPT ); Sun, 20 Jan 2013 05:24:39 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1358677478; bh=M+VWxs6Cm3jDjAiA1tT8oDpGYUsX/R9/QIAkKdD5rnI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=AYf5 9WyHBiYyPCnWt6vyIUu8E+SAEApWar2kUAlQ2UFZgT/gCFEhLDZMjdcbDkjZRjXLkq8 8Kc9hRCYoBNQH26Xwq4/iIZWqJWlNv4r/tRF8cOLmG31MCqv8o4OCX6Rgxgr6xnyw8E OoPlfitXKJWgtLqjx0D+ikbBuOywRpYM4= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Q8zqxqv7R0Ef; Sun, 20 Jan 2013 11:24:38 +0100 (CET) Received: from liondog.tnic (p4FF1D70B.dip.t-dialin.net [79.241.215.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 2D25C1D9DF7; Sun, 20 Jan 2013 11:24:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1358677477; bh=M+VWxs6Cm3jDjAiA1tT8oDpGYUsX/R9/QIAkKdD5rnI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=G+WV +ufN4fMqsc3c66YgB/kJNHnN+hm26ag8ijfwbBLnek6Kj02PXMM7HBl9mMcnRfHss6X 0yMGWY9RpmX3JJjJBykeY82cICpbfzZqryHd/M2LcqntjWoEC367OIX5zAtASBmyAcg UytY/WyUmAkS9jdgZS8a9jIE4JfyqKaqM= Received: by liondog.tnic (Postfix, from userid 1000) id BEC9410059C; Sun, 20 Jan 2013 11:24:36 +0100 (CET) From: Borislav Petkov To: "Rafael J. Wysocki" Cc: =?UTF-8?q?Andr=C3=A9=20Przywara?= , Leonid Isaev , Tom Gundersen , cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org, LKML , Matthew Garrett , Borislav Petkov Subject: [PATCH 2/6] acpi-cpufreq: Do not load on K8 Date: Sun, 20 Jan 2013 11:24:26 +0100 Message-Id: <1358677470-17394-3-git-send-email-bp@alien8.de> X-Mailer: git-send-email 1.8.1.rc3 In-Reply-To: <1358677470-17394-1-git-send-email-bp@alien8.de> References: <1358677470-17394-1-git-send-email-bp@alien8.de> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Matthew Garrett de3ed81d746d ("[CPUFREQ] Change link order of x86 cpufreq modules") changed cpufreq drivers link order so that powernow-k8 gets loaded first due to earlier K8s having BIOS bugs. However, now that acpi-cpufreq supports both AMD and Intel CPUs with HW P-states, we want to load it first, so that cases where acpi-cpufreq and powernow-k8 are both built-in and powernow-k8 initializing first, can be addressed. So, make sure that even if acpi-cpufreq gets loaded first, it errors out on K8s and powernow-k8 can be loaded then successfully. Signed-off-by: Matthew Garrett Link: http://lkml.kernel.org/r/20130118162347.GA31499@srcf.ucam.org Signed-off-by: Borislav Petkov --- drivers/cpufreq/acpi-cpufreq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 0d048f6a2b23..31b06bbab54c 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -762,6 +762,12 @@ 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 && + boot_cpu_data.x86 == 0xf) { + pr_debug("AMD K8 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;