 +/* Only called while gtod->lock is held */
 +notrace static inline vcounter_t vread_vcounter_delta(void)
 +{
-+	return((clocksource_read(clock) - clock->vcounter_source_record) & clock->mask);
++	return((gtod->clock.vread() - gtod->clock.vcounter_source_record) & gtod->clock.mask);
 +}
 +
 +/* Copy of the version in kernel/time/timekeeping.c which we cannot directly access */

+
+	do {
+		seq = read_seqbegin(&xtime_lock);
+		vcount = clock->vcounter_record + vread_vcounter_delta();
+	} while (read_seqretry(&xtime_lock, seq));
+
+	return vcount;

 }
 
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index ee55754..d1463c9 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -157,3 +157,90 @@ notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
