[PATCH] x86, amd: Remove needless CPU family check (for L3 cacheinfo)

From: Andreas Herrmann
Date: Thu Sep 02 2010 - 09:03:51 EST


From: Andreas Herrmann <andreas.herrmann3@xxxxxxx>

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@xxxxxxxxxxxxxx>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/