aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2008-01-30 07:32:37 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:37 -0500
commitde4218634e3df6d73a3e6cdfdf3a17fa3bc7e013 (patch)
treedf7438f5ee81fc7c93f5e9ab3f4249a5afc3d31c /arch/x86/kernel/cpu/amd.c
parent27efeb67714608b28c0b213cceb6080749435c6b (diff)
x86: implement support to synchronize RDTSC through MFENCE on AMD CPUs
According to AMD RDTSC can be synchronized through MFENCE. Implement the necessary CPUID bit for that. Cc: andreas.herrmann3@amd.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 1ff88c7f45cf..aaa8101d3d80 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -301,6 +301,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
301 /* K6s reports MCEs but don't actually have all the MSRs */ 301 /* K6s reports MCEs but don't actually have all the MSRs */
302 if (c->x86 < 6) 302 if (c->x86 < 6)
303 clear_bit(X86_FEATURE_MCE, c->x86_capability); 303 clear_bit(X86_FEATURE_MCE, c->x86_capability);
304
305 if (cpu_has_xmm)
306 set_bit(X86_FEATURE_MFENCE_RDTSC, c->x86_capability);
304} 307}
305 308
306static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) 309static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)