Lines Matching defs:tks

750 static inline void tk_update_ns_to_cyc(struct timekeeper *tks, struct timekeeper *tkc)
752 struct tk_read_base *tkrs = &tks->tkr_mono;
775 shift = tkrs->shift + tks->cs_ns_to_cyc_shift;
776 tks->cs_ns_to_cyc_mult = (u32)div_u64(1ULL << shift, tkrs->mult);
777 tks->cs_ns_to_cyc_maxns = div_u64(tkrs->clock->mask, tks->cs_ns_to_cyc_mult);
1666 struct timekeeper *tks = &tk_core.shadow_timekeeper;
1668 timekeeping_forward_now(tks);
1670 xt = tk_xtime(tks);
1673 if (timespec64_compare(&tks->wall_to_monotonic, &ts_delta) > 0) {
1678 tk_set_wall_to_mono(tks, timespec64_sub(tks->wall_to_monotonic, ts_delta));
1679 tk_set_xtime(tks, ts);
1706 struct timekeeper *tks = &tkd->shadow_timekeeper;
1712 timekeeping_forward_now(tks);
1714 if (timekeeper_is_core_tk(tks)) {
1716 tmp = timespec64_add(tk_xtime(tks), *ts);
1717 if (timespec64_compare(&tks->wall_to_monotonic, ts) > 0 ||
1723 tk_xtime_add(tks, ts);
1724 tk_set_wall_to_mono(tks, timespec64_sub(tks->wall_to_monotonic, *ts));
1726 struct tk_read_base *tkr_mono = &tks->tkr_mono;
1732 offs = ktime_add(tks->offs_aux, timespec64_to_ktime(*ts));
1739 tk_update_aux_offs(tks, offs);
1826 struct timekeeper *tks = &tk_core.shadow_timekeeper;
1828 timekeeping_forward_now(tks);
1829 old = tks->tkr_mono.clock;
1830 tk_setup_internals(tks, new);
2040 struct timekeeper *tks = &tk_core.shadow_timekeeper;
2072 tk_setup_internals(tks, clock);
2074 tk_set_xtime(tks, &wall_time);
2075 tks->raw_sec = 0;
2077 tk_set_wall_to_mono(tks, wall_to_mono);
2158 struct timekeeper *tks = &tk_core.shadow_timekeeper;
2161 timekeeping_forward_now(tks);
2162 __timekeeping_inject_sleeptime(tks, delta);
2176 struct timekeeper *tks = &tk_core.shadow_timekeeper;
2177 struct clocksource *clock = tks->tkr_mono.clock;
2202 cycle_now = tk_clock_read(&tks->tkr_mono);
2214 __timekeeping_inject_sleeptime(tks, &ts_delta);
2218 tks->tkr_mono.cycle_last = cycle_now;
2219 tks->tkr_raw.cycle_last = cycle_now;
2221 tks->ntp_error = 0;
2241 struct timekeeper *tks = &tk_core.shadow_timekeeper;
2261 timekeeping_forward_now(tks);
2269 curr_clock = tks->tkr_mono.clock;
2270 cycle_now = tks->tkr_mono.cycle_last;
2280 delta = timespec64_sub(tk_xtime(tks), timekeeping_suspend_time);
2296 halt_fast_timekeeper(tks);
2934 struct timekeeper *tks = &tkd->shadow_timekeeper;
2935 bool aux_clock = !timekeeper_is_core_tk(tks);
2955 if (!tks->clock_valid)
2969 orig_tai = tai = tks->tai_offset;
2970 ret = ntp_adjtimex(tks->id, txc, &ts, &tai, &result->ad);
2973 __timekeeping_set_tai_offset(tks, tai);
3067 struct timekeeper *tks = &tkd->shadow_timekeeper;
3070 if (!tks->clock_valid)
3073 timekeeping_forward_now(tks);
3074 tk_setup_internals(tks, tk_core.timekeeper.tkr_raw.clock);