lkml.org 
[lkml]   [2012]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] x86, CPU: Extend TLB size detection for AMD
Date
From: Borislav Petkov <borislav.petkov@amd.com>

TLB characteristics on AMD are in the extended CPUID level, leafs
0x8000000{5,6} so we need to check those before doing the detection.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
arch/x86/kernel/cpu/common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index d239977f361f..ebab0e77e691 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -940,7 +940,8 @@ void __init identify_boot_cpu(void)
#else
vgetcpu_set_mode();
#endif
- if (boot_cpu_data.cpuid_level >= 2)
+ if (boot_cpu_data.cpuid_level >= 2 ||
+ boot_cpu_data.extended_cpuid_level >= 0x80000006)
cpu_detect_tlb(&boot_cpu_data);
}

--
1.7.11.rc1


\
 
 \ /
  Last update: 2012-08-03 19:21    [W:0.753 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site