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>
This commit is contained in:
parent
e402644013
commit
f06e4ec1c1
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue