From: "Andreas Herrmann" <andreas.herrmann3@amd.com>
To: linux-kernel@vger.kernel.org, "Andi Kleen" <ak@suse.de>
Subject: [PATCH] x86: limit mwait_idle to Intel CPUs
Date: Thu, 5 Apr 2007 16:00:45 +0200 [thread overview]
Message-ID: <20070405140045.GN6356@alberich.amd.com> (raw)
Commit 991528d7348667924176f3e29addea0675298944
introduced mwait_idle which is supposed to work
for Intel CPUs starting with Core Duo.
AMD Fam10 processors won't enter C1 on mwait.
This patch will enable default_idle for non-Intel
CPUs even if mwait is supported.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
arch/i386/kernel/process.c | 4 +++-
arch/x86_64/kernel/process.c | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 393a67d..e3067e4 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -259,7 +259,9 @@ static void mwait_idle(void)
void __devinit select_idle_routine(const struct cpuinfo_x86 *c)
{
- if (cpu_has(c, X86_FEATURE_MWAIT)) {
+ if (cpu_has(c, X86_FEATURE_MWAIT) &&
+ (c->x86_vendor == X86_VENDOR_INTEL)) {
+
printk("monitor/mwait feature present.\n");
/*
* Skip, if setup has overridden idle.
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index d8d5ccc..fed830c 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -271,7 +271,8 @@ static void mwait_idle(void)
void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
{
static int printed;
- if (cpu_has(c, X86_FEATURE_MWAIT)) {
+ if (cpu_has(c, X86_FEATURE_MWAIT) &&
+ (c->x86_vendor == X86_VENDOR_INTEL)) {
/*
* Skip, if setup has overridden idle.
* One CPU supports mwait => All CPUs supports mwait
--
1.5.0.6
next reply other threads:[~2007-04-05 14:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 14:00 Andreas Herrmann [this message]
2007-04-05 14:24 ` [PATCH] x86: limit mwait_idle to Intel CPUs Andi Kleen
2007-04-05 14:44 ` Andreas Herrmann
2007-04-05 15:37 ` Andi Kleen
2007-04-05 16:20 ` Andreas Herrmann
2007-04-05 16:55 ` H. Peter Anvin
2007-04-05 17:06 ` Markus Rechberger
2007-04-05 17:36 ` H. Peter Anvin
2007-04-05 21:12 ` aherrman
2007-04-05 21:19 ` H. Peter Anvin
2007-04-05 17:05 ` Andi Kleen
2007-04-05 14:46 ` Langsdorf, Mark
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=20070405140045.GN6356@alberich.amd.com \
--to=andreas.herrmann3@amd.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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