x86: clean up rdtsc_barrier() use
Impact: cleanup Move rdtsc_barrier() use to vsyscall_64.c where it's relied on, and point out its role in the context of its use. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -128,7 +128,16 @@ static __always_inline void do_vgettimeofday(struct timeval * tv)
|
||||
gettimeofday(tv,NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Surround the RDTSC by barriers, to make sure it's not
|
||||
* speculated to outside the seqlock critical section and
|
||||
* does not cause time warps:
|
||||
*/
|
||||
rdtsc_barrier();
|
||||
now = vread();
|
||||
rdtsc_barrier();
|
||||
|
||||
base = __vsyscall_gtod_data.clock.cycle_last;
|
||||
mask = __vsyscall_gtod_data.clock.mask;
|
||||
mult = __vsyscall_gtod_data.clock.mult;
|
||||
|
Reference in New Issue
Block a user