diff options
Diffstat (limited to 'arch/x86/kernel/vsyscall_64.c')
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 0b8b6690a86d..ebf2f12900f5 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -128,7 +128,16 @@ static __always_inline void do_vgettimeofday(struct timeval * tv) | |||
128 | gettimeofday(tv,NULL); | 128 | gettimeofday(tv,NULL); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | |||
132 | /* | ||
133 | * Surround the RDTSC by barriers, to make sure it's not | ||
134 | * speculated to outside the seqlock critical section and | ||
135 | * does not cause time warps: | ||
136 | */ | ||
137 | rdtsc_barrier(); | ||
131 | now = vread(); | 138 | now = vread(); |
139 | rdtsc_barrier(); | ||
140 | |||
132 | base = __vsyscall_gtod_data.clock.cycle_last; | 141 | base = __vsyscall_gtod_data.clock.cycle_last; |
133 | mask = __vsyscall_gtod_data.clock.mask; | 142 | mask = __vsyscall_gtod_data.clock.mask; |
134 | mult = __vsyscall_gtod_data.clock.mult; | 143 | mult = __vsyscall_gtod_data.clock.mult; |