aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/common.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-12-07 02:14:05 +0100
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 02:14:05 +0100
commit770d132f03ac15b12919f1bac481f4beda13e094 (patch)
treefdf8470cd380f2db1960102c928806f687f72938 /arch/i386/kernel/cpu/common.c
parent[PATCH] x86-64: Speed and clean up cache flushing in change_page_attr (diff)
downloadlinux-dev-770d132f03ac15b12919f1bac481f4beda13e094.tar.xz
linux-dev-770d132f03ac15b12919f1bac481f4beda13e094.zip
[PATCH] i386: Retrieve CLFLUSH size from CPUID
Also report it in /proc/cpuinfo similar to x86-64. Needed for followon patch Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/cpu/common.c')
-rw-r--r--arch/i386/kernel/cpu/common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 6958ae5e2fa5..cda41aef79ad 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -309,6 +309,8 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
#else
c->apicid = (ebx >> 24) & 0xFF;
#endif
+ if (c->x86_capability[0] & (1<<19))
+ c->x86_clflush_size = ((ebx >> 8) & 0xff) * 8;
} else {
/* Have CPUID level 0 only - unheard of */
c->x86 = 4;
@@ -373,6 +375,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
c->x86_vendor_id[0] = '\0'; /* Unset */
c->x86_model_id[0] = '\0'; /* Unset */
c->x86_max_cores = 1;
+ c->x86_clflush_size = 32;
memset(&c->x86_capability, 0, sizeof c->x86_capability);
if (!have_cpuid_p()) {