Lines Matching refs:vvar
126 notrace static __always_inline u64 vgetsns(struct vvar_data *vvar) in vgetsns() argument
132 v = (cycles - vvar->clock.cycle_last) & vvar->clock.mask; in vgetsns()
133 return v * vvar->clock.mult; in vgetsns()
136 notrace static __always_inline u64 vgetsns_stick(struct vvar_data *vvar) in vgetsns_stick() argument
142 v = (cycles - vvar->clock.cycle_last) & vvar->clock.mask; in vgetsns_stick()
143 return v * vvar->clock.mult; in vgetsns_stick()
146 notrace static __always_inline int do_realtime(struct vvar_data *vvar, in do_realtime() argument
153 seq = vvar_read_begin(vvar); in do_realtime()
154 ts->tv_sec = vvar->wall_time_sec; in do_realtime()
155 ns = vvar->wall_time_snsec; in do_realtime()
156 ns += vgetsns(vvar); in do_realtime()
157 ns >>= vvar->clock.shift; in do_realtime()
158 } while (unlikely(vvar_read_retry(vvar, seq))); in do_realtime()
166 notrace static __always_inline int do_realtime_stick(struct vvar_data *vvar, in do_realtime_stick() argument
173 seq = vvar_read_begin(vvar); in do_realtime_stick()
174 ts->tv_sec = vvar->wall_time_sec; in do_realtime_stick()
175 ns = vvar->wall_time_snsec; in do_realtime_stick()
176 ns += vgetsns_stick(vvar); in do_realtime_stick()
177 ns >>= vvar->clock.shift; in do_realtime_stick()
178 } while (unlikely(vvar_read_retry(vvar, seq))); in do_realtime_stick()
186 notrace static __always_inline int do_monotonic(struct vvar_data *vvar, in do_monotonic() argument
193 seq = vvar_read_begin(vvar); in do_monotonic()
194 ts->tv_sec = vvar->monotonic_time_sec; in do_monotonic()
195 ns = vvar->monotonic_time_snsec; in do_monotonic()
196 ns += vgetsns(vvar); in do_monotonic()
197 ns >>= vvar->clock.shift; in do_monotonic()
198 } while (unlikely(vvar_read_retry(vvar, seq))); in do_monotonic()
206 notrace static __always_inline int do_monotonic_stick(struct vvar_data *vvar, in do_monotonic_stick() argument
213 seq = vvar_read_begin(vvar); in do_monotonic_stick()
214 ts->tv_sec = vvar->monotonic_time_sec; in do_monotonic_stick()
215 ns = vvar->monotonic_time_snsec; in do_monotonic_stick()
216 ns += vgetsns_stick(vvar); in do_monotonic_stick()
217 ns >>= vvar->clock.shift; in do_monotonic_stick()
218 } while (unlikely(vvar_read_retry(vvar, seq))); in do_monotonic_stick()
226 notrace static int do_realtime_coarse(struct vvar_data *vvar, in do_realtime_coarse() argument
232 seq = vvar_read_begin(vvar); in do_realtime_coarse()
233 ts->tv_sec = vvar->wall_time_coarse_sec; in do_realtime_coarse()
234 ts->tv_nsec = vvar->wall_time_coarse_nsec; in do_realtime_coarse()
235 } while (unlikely(vvar_read_retry(vvar, seq))); in do_realtime_coarse()
239 notrace static int do_monotonic_coarse(struct vvar_data *vvar, in do_monotonic_coarse() argument
245 seq = vvar_read_begin(vvar); in do_monotonic_coarse()
246 ts->tv_sec = vvar->monotonic_time_coarse_sec; in do_monotonic_coarse()
247 ts->tv_nsec = vvar->monotonic_time_coarse_nsec; in do_monotonic_coarse()
248 } while (unlikely(vvar_read_retry(vvar, seq))); in do_monotonic_coarse()