aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/rtc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 07:32:39 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:39 -0500
commitf06e4ec1c15691b0cfd2397ae32214fa36c90d71 (patch)
treed8191c516d3d9823c6d7a0e4ec0636137aa7fd61 /arch/x86/kernel/rtc.c
parente4026440130b84101f2da7f5a0c7a3b046173d3c (diff)
x86: read_tsc sync
make native_read_tsc() always non-speculative. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/rtc.c')
-rw-r--r--arch/x86/kernel/rtc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index c42cf1263882..276cb7073ab1 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)
200{ 200{
201 DECLARE_ARGS(val, low, high); 201 DECLARE_ARGS(val, low, high);
202 202
203 rdtsc_barrier();
203 asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); 204 asm volatile("rdtsc" : EAX_EDX_RET(val, low, high));
205 rdtsc_barrier();
206
204 return EAX_EDX_VAL(val, low, high); 207 return EAX_EDX_VAL(val, low, high);
205} 208}
206EXPORT_SYMBOL_GPL(native_read_tsc); 209EXPORT_SYMBOL_GPL(native_read_tsc);