public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, amd: Remove needless CPU family check (for L3 cache info)
@ 2010-09-02 13:37 Andreas Herrmann
  2010-09-05 13:05 ` [tip:x86/cpu] x86, AMD: " tip-bot for Andreas Herrmann
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Herrmann @ 2010-09-02 13:37 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner; +Cc: linux-kernel, Andi Kleen

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/cpu] x86, AMD: Remove needless CPU family check (for L3 cache info)
  2010-09-02 13:37 [PATCH] x86, amd: Remove needless CPU family check (for L3 cache info) Andreas Herrmann
@ 2010-09-05 13:05 ` tip-bot for Andreas Herrmann
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Andreas Herrmann @ 2010-09-05 13:05 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, andi, andreas.herrmann3, tglx, mingo

Commit-ID:  d9fadd7ba99a67030783a212bcb17d11f0678433
Gitweb:     http://git.kernel.org/tip/d9fadd7ba99a67030783a212bcb17d11f0678433
Author:     Andreas Herrmann <andreas.herrmann3@amd.com>
AuthorDate: Thu, 2 Sep 2010 15:37:10 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 5 Sep 2010 14:33:48 +0200

x86, AMD: Remove needless CPU family check (for L3 cache info)

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 67cddd94799 ("i386: Add L3 cache
support to AMD CPUID4 emulation"). The current check is the
result of the x86 merge.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Andi Kleen <andi@firstfloor.org>
LKML-Reference: <20100902133710.GA5449@loge.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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 fc563fa..0f0ace5 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -540,7 +540,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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-05 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 13:37 [PATCH] x86, amd: Remove needless CPU family check (for L3 cache info) Andreas Herrmann
2010-09-05 13:05 ` [tip:x86/cpu] x86, AMD: " tip-bot for Andreas Herrmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox