From: Andreas Herrmann <herrmann.der.user@googlemail.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <andi@firstfloor.org>
Subject: [PATCH] x86, amd: Remove needless CPU family check (for L3 cache info)
Date: Thu, 2 Sep 2010 15:37:10 +0200 [thread overview]
Message-ID: <20100902133710.GA5449@loge.amd.com> (raw)
From: Andreas Herrmann <andreas.herrmann3@amd.com>
Old 32-bit AMD CPUs (all w/o L3 cache) should always return 0 for
cpuid_edx(0x80000006).
For unknown reason the 32-bit implementation differed from the 64-bit
implementation. See commit 67cddd947992b02f01ad093ec814738c5827d17c
(i386: Add L3 cache support to AMD CPUID4 emulation).
The current check is the result of the x86 merge.
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
arch/x86/kernel/cpu/amd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index fcf9895..a965b53 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -539,7 +539,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
#endif
if (c->extended_cpuid_level >= 0x80000006) {
- if ((c->x86 >= 0x0f) && (cpuid_edx(0x80000006) & 0xf000))
+ if (cpuid_edx(0x80000006) & 0xf000)
num_cache_leaves = 4;
else
num_cache_leaves = 3;
--
1.6.4.4
next reply other threads:[~2010-09-02 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 13:37 Andreas Herrmann [this message]
2010-09-05 13:05 ` [tip:x86/cpu] x86, AMD: Remove needless CPU family check (for L3 cache info) tip-bot for Andreas Herrmann
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=20100902133710.GA5449@loge.amd.com \
--to=herrmann.der.user@googlemail.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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