public inbox for cpufreq@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "André Przywara" <andre@andrep.de>,
	"Leonid Isaev" <lisaev@umail.iu.edu>,
	"Tom Gundersen" <teg@jklm.no>,
	cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Borislav Petkov" <bp@suse.de>
Subject: [PATCH 2/6] acpi-cpufreq: Do not load on K8
Date: Sun, 20 Jan 2013 11:24:26 +0100	[thread overview]
Message-ID: <1358677470-17394-3-git-send-email-bp@alien8.de> (raw)
In-Reply-To: <1358677470-17394-1-git-send-email-bp@alien8.de>

From: Matthew Garrett <mjg59@srcf.ucam.org>

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 <mjg59@srcf.ucam.org>
Link: http://lkml.kernel.org/r/20130118162347.GA31499@srcf.ucam.org
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 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;
-- 
1.8.1.rc3


  parent reply	other threads:[~2013-01-20 10:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 10:24 [PATCH 0/6] acpi-cpufreq and powernow-k8 fixes Borislav Petkov
2013-01-20 10:24 ` [PATCH 1/6] powernow-k8: Add a kconfig dependency on acpi-cpufreq Borislav Petkov
2013-01-20 10:24 ` Borislav Petkov [this message]
2013-01-20 10:24 ` [PATCH 3/6] cpufreq: Make acpi-cpufreq link first Borislav Petkov
2013-01-20 10:24 ` [PATCH 4/6] cpufreq: Add a get_current_driver helper Borislav Petkov
2013-01-28  4:37   ` Viresh Kumar
2013-01-28  9:49     ` Borislav Petkov
2013-01-28  9:52       ` Viresh Kumar
2013-01-20 10:24 ` [PATCH 5/6] powernow-k8: Cleanup module request Borislav Petkov
2013-01-20 10:24 ` [PATCH 6/6] powernow-k8: Cleanup init function Borislav Petkov
2013-01-20 14:18 ` [PATCH 0/6] acpi-cpufreq and powernow-k8 fixes Rafael J. Wysocki
2013-01-21  0:04   ` Borislav Petkov
2013-01-21  0:13     ` Rafael J. Wysocki
2013-01-22 14:00 ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358677470-17394-3-git-send-email-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=andre@andrep.de \
    --cc=bp@suse.de \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lisaev@umail.iu.edu \
    --cc=mjg59@srcf.ucam.org \
    --cc=rjw@sisk.pl \
    --cc=teg@jklm.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox