Commit f06e4ec1 authored by Ingo Molnar's avatar Ingo Molnar

x86: read_tsc sync

make native_read_tsc() always non-speculative.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e4026440
...@@ -200,7 +200,10 @@ unsigned long long __vsyscall_fn native_read_tsc(void) ...@@ -200,7 +200,10 @@ unsigned long long __vsyscall_fn native_read_tsc(void)
{ {
DECLARE_ARGS(val, low, high); DECLARE_ARGS(val, low, high);
rdtsc_barrier();
asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); asm volatile("rdtsc" : EAX_EDX_RET(val, low, high));
rdtsc_barrier();
return EAX_EDX_VAL(val, low, high); return EAX_EDX_VAL(val, low, high);
} }
EXPORT_SYMBOL_GPL(native_read_tsc); EXPORT_SYMBOL_GPL(native_read_tsc);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment