From: tip-bot for Fenghua Yu <fenghua.yu@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
fenghua.yu@intel.com, tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/cpufeature] x86, cpufeature: Fix cpuid leaf 7 feature detection
Date: Tue, 17 May 2011 21:31:08 GMT [thread overview]
Message-ID: <tip-2494b030ba9334c7dd7df9b9f7abe4eacc950ec5@git.kernel.org> (raw)
In-Reply-To: <1305660806-17519-1-git-send-email-fenghua.yu@intel.com>
Commit-ID: 2494b030ba9334c7dd7df9b9f7abe4eacc950ec5
Gitweb: http://git.kernel.org/tip/2494b030ba9334c7dd7df9b9f7abe4eacc950ec5
Author: Fenghua Yu <fenghua.yu@intel.com>
AuthorDate: Tue, 17 May 2011 12:33:26 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 17 May 2011 13:36:29 -0700
x86, cpufeature: Fix cpuid leaf 7 feature detection
CPUID leaf 7, subleaf 0 returns the maximum subleaf in EAX, not the
number of subleaves. Since so far only subleaf 0 is defined (and only
the EBX bitfield) we do not need to qualify the test.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1305660806-17519-1-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@kernel.org> 2.6.36..39
---
arch/x86/kernel/cpu/common.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index e2ced00..173f3a3 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -565,8 +565,7 @@ void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx);
- if (eax > 0)
- c->x86_capability[9] = ebx;
+ c->x86_capability[9] = ebx;
}
/* AMD-defined flags: level 0x80000001 */
parent reply other threads:[~2011-05-17 21:31 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1305660806-17519-1-git-send-email-fenghua.yu@intel.com>]
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=tip-2494b030ba9334c7dd7df9b9f7abe4eacc950ec5@git.kernel.org \
--to=fenghua.yu@intel.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).