Lines Matching +full:data +full:- +full:shift
1 // SPDX-License-Identifier: GPL-2.0
24 vdata[CS_HRES_COARSE].cycle_last = tk->tkr_mono.cycle_last; in update_vdso_data()
26 vdata[CS_HRES_COARSE].max_cycles = tk->tkr_mono.clock->max_cycles; in update_vdso_data()
28 vdata[CS_HRES_COARSE].mask = tk->tkr_mono.mask; in update_vdso_data()
29 vdata[CS_HRES_COARSE].mult = tk->tkr_mono.mult; in update_vdso_data()
30 vdata[CS_HRES_COARSE].shift = tk->tkr_mono.shift; in update_vdso_data()
31 vdata[CS_RAW].cycle_last = tk->tkr_raw.cycle_last; in update_vdso_data()
33 vdata[CS_RAW].max_cycles = tk->tkr_raw.clock->max_cycles; in update_vdso_data()
35 vdata[CS_RAW].mask = tk->tkr_raw.mask; in update_vdso_data()
36 vdata[CS_RAW].mult = tk->tkr_raw.mult; in update_vdso_data()
37 vdata[CS_RAW].shift = tk->tkr_raw.shift; in update_vdso_data()
41 vdso_ts->sec = tk->xtime_sec + tk->wall_to_monotonic.tv_sec; in update_vdso_data()
43 nsec = tk->tkr_mono.xtime_nsec; in update_vdso_data()
44 nsec += ((u64)tk->wall_to_monotonic.tv_nsec << tk->tkr_mono.shift); in update_vdso_data()
45 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data()
46 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data()
47 vdso_ts->sec++; in update_vdso_data()
49 vdso_ts->nsec = nsec; in update_vdso_data()
52 sec = vdso_ts->sec; in update_vdso_data()
54 sec += tk->monotonic_to_boot.tv_sec; in update_vdso_data()
55 nsec += (u64)tk->monotonic_to_boot.tv_nsec << tk->tkr_mono.shift; in update_vdso_data()
59 vdso_ts->sec = sec; in update_vdso_data()
61 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data()
62 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data()
63 vdso_ts->sec++; in update_vdso_data()
65 vdso_ts->nsec = nsec; in update_vdso_data()
69 vdso_ts->sec = tk->raw_sec; in update_vdso_data()
70 vdso_ts->nsec = tk->tkr_raw.xtime_nsec; in update_vdso_data()
74 vdso_ts->sec = tk->xtime_sec + (s64)tk->tai_offset; in update_vdso_data()
75 vdso_ts->nsec = tk->tkr_mono.xtime_nsec; in update_vdso_data()
85 /* copy vsyscall data */ in update_vsyscall()
88 clock_mode = tk->tkr_mono.clock->vdso_clock_mode; in update_vsyscall()
94 vdso_ts->sec = tk->xtime_sec; in update_vsyscall()
95 vdso_ts->nsec = tk->tkr_mono.xtime_nsec; in update_vsyscall()
99 vdso_ts->sec = tk->xtime_sec; in update_vsyscall()
100 vdso_ts->nsec = tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift; in update_vsyscall()
104 vdso_ts->sec = tk->xtime_sec + tk->wall_to_monotonic.tv_sec; in update_vsyscall()
105 nsec = tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift; in update_vsyscall()
106 nsec = nsec + tk->wall_to_monotonic.tv_nsec; in update_vsyscall()
107 vdso_ts->sec += __iter_div_u64_rem(nsec, NSEC_PER_SEC, &vdso_ts->nsec); in update_vsyscall()
140 * vdso_update_begin - Start of a VDSO update section
143 * data. Disables interrupts, acquires timekeeper lock to serialize against
144 * concurrent updates from timekeeping and invalidates the VDSO data
146 * inconsistent data.
162 * vdso_update_end - End of a VDSO update section
165 * Pairs with vdso_update_begin(). Marks vdso data consistent, invokes data