From: Ingo Molnar Date: Wed, 30 Jan 2008 12:32:39 +0000 (+0100) Subject: x86: read_tsc sync X-Git-Tag: v2.6.25-rc1~1143^2~420 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f06e4ec1c15691b0cfd2397ae32214fa36c90d71;p=linux-2.6 x86: read_tsc sync make native_read_tsc() always non-speculative. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index c42cf12638..276cb7073a 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -200,7 +200,10 @@ unsigned long long __vsyscall_fn native_read_tsc(void) { DECLARE_ARGS(val, low, high); + rdtsc_barrier(); asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); + rdtsc_barrier(); + return EAX_EDX_VAL(val, low, high); } EXPORT_SYMBOL_GPL(native_read_tsc);