Lines Matching refs:tkr_mono

119 	while (tk->tkr_mono.xtime_nsec >= ((u64)NSEC_PER_SEC << tk->tkr_mono.shift)) {  in tk_normalize_xtime()
120 tk->tkr_mono.xtime_nsec -= (u64)NSEC_PER_SEC << tk->tkr_mono.shift; in tk_normalize_xtime()
134 ts.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); in tk_xtime()
141 tk->tkr_mono.xtime_nsec = (u64)ts->tv_nsec << tk->tkr_mono.shift; in tk_set_xtime()
147 tk->tkr_mono.xtime_nsec += (u64)ts->tv_nsec << tk->tkr_mono.shift; in tk_xtime_add()
204 u64 max_cycles = tk->tkr_mono.clock->max_cycles; in timekeeping_check_update()
205 const char *name = tk->tkr_mono.clock->name; in timekeeping_check_update()
316 old_clock = tk->tkr_mono.clock; in tk_setup_internals()
317 tk->tkr_mono.clock = clock; in tk_setup_internals()
318 tk->tkr_mono.mask = clock->mask; in tk_setup_internals()
319 tk->tkr_mono.cycle_last = tk_clock_read(&tk->tkr_mono); in tk_setup_internals()
323 tk->tkr_raw.cycle_last = tk->tkr_mono.cycle_last; in tk_setup_internals()
346 tk->tkr_mono.xtime_nsec >>= -shift_change; in tk_setup_internals()
349 tk->tkr_mono.xtime_nsec <<= shift_change; in tk_setup_internals()
354 tk->tkr_mono.shift = clock->shift; in tk_setup_internals()
366 tk->tkr_mono.mult = clock->mult; in tk_setup_internals()
654 const struct tk_read_base *tkr = &tk->tkr_mono; in halt_fast_timekeeper()
740 tk->tkr_mono.base = ns_to_ktime(seconds * NSEC_PER_SEC + nsec); in tk_update_ktime_data()
747 nsec += (u32)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); in tk_update_ktime_data()
770 tk->tkr_mono.base_real = tk->tkr_mono.base + tk->offs_real; in timekeeping_update()
771 update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono); in timekeeping_update()
798 cycle_now = tk_clock_read(&tk->tkr_mono); in timekeeping_forward_now()
799 delta = clocksource_delta(cycle_now, tk->tkr_mono.cycle_last, tk->tkr_mono.mask); in timekeeping_forward_now()
800 tk->tkr_mono.cycle_last = cycle_now; in timekeeping_forward_now()
803 tk->tkr_mono.xtime_nsec += delta * tk->tkr_mono.mult; in timekeeping_forward_now()
827 nsecs = timekeeping_get_ns(&tk->tkr_mono); in ktime_get_real_ts64()
847 base = tk->tkr_mono.base; in ktime_get()
848 nsecs = timekeeping_get_ns(&tk->tkr_mono); in ktime_get()
866 nsecs = tk->tkr_mono.mult >> tk->tkr_mono.shift; in ktime_get_resolution_ns()
890 base = ktime_add(tk->tkr_mono.base, *offset); in ktime_get_with_offset()
891 nsecs = timekeeping_get_ns(&tk->tkr_mono); in ktime_get_with_offset()
911 base = ktime_add(tk->tkr_mono.base, *offset); in ktime_get_coarse_with_offset()
912 nsecs = tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift; in ktime_get_coarse_with_offset()
981 nsec = timekeeping_get_ns(&tk->tkr_mono); in ktime_get_ts64()
1069 now = tk_clock_read(&tk->tkr_mono); in ktime_get_snapshot()
1070 systime_snapshot->cs_id = tk->tkr_mono.clock->id; in ktime_get_snapshot()
1073 base_real = ktime_add(tk->tkr_mono.base, in ktime_get_snapshot()
1076 nsec_real = timekeeping_cycles_to_ns(&tk->tkr_mono, now); in ktime_get_snapshot()
1160 (corr_raw, tk->tkr_mono.mult, tk->tkr_raw.mult); in adjust_historical_crosststamp()
1239 if (tk->tkr_mono.clock != system_counterval.cs) in get_device_system_crosststamp()
1247 now = tk_clock_read(&tk->tkr_mono); in get_device_system_crosststamp()
1248 interval_start = tk->tkr_mono.cycle_last; in get_device_system_crosststamp()
1258 base_real = ktime_add(tk->tkr_mono.base, in get_device_system_crosststamp()
1262 nsec_real = timekeeping_cycles_to_ns(&tk->tkr_mono, in get_device_system_crosststamp()
1474 old = tk->tkr_mono.clock; in change_clocksource()
1504 if (tk->tkr_mono.clock == clock) in timekeeping_notify()
1508 return tk->tkr_mono.clock == clock ? 0 : -1; in timekeeping_notify()
1548 ret = tk->tkr_mono.clock->flags & CLOCK_SOURCE_VALID_FOR_HRES; in timekeeping_valid_for_hres()
1567 ret = tk->tkr_mono.clock->max_idle_ns; in timekeeping_max_deferment()
1780 struct clocksource *clock = tk->tkr_mono.clock; in timekeeping_resume()
1806 cycle_now = tk_clock_read(&tk->tkr_mono); in timekeeping_resume()
1822 tk->tkr_mono.cycle_last = cycle_now; in timekeeping_resume()
1870 curr_clock = tk->tkr_mono.clock; in timekeeping_suspend()
1871 cycle_now = tk->tkr_mono.cycle_last; in timekeeping_suspend()
1987 if ((mult_adj > 0) && (tk->tkr_mono.mult + mult_adj < mult_adj)) { in timekeeping_apply_adjustment()
1993 tk->tkr_mono.mult += mult_adj; in timekeeping_apply_adjustment()
1995 tk->tkr_mono.xtime_nsec -= offset; in timekeeping_apply_adjustment()
2011 mult = tk->tkr_mono.mult - tk->ntp_err_mult; in timekeeping_adjust()
2027 timekeeping_apply_adjustment(tk, offset, mult - tk->tkr_mono.mult); in timekeeping_adjust()
2029 if (unlikely(tk->tkr_mono.clock->maxadj && in timekeeping_adjust()
2030 (abs(tk->tkr_mono.mult - tk->tkr_mono.clock->mult) in timekeeping_adjust()
2031 > tk->tkr_mono.clock->maxadj))) { in timekeeping_adjust()
2034 tk->tkr_mono.clock->name, (long)tk->tkr_mono.mult, in timekeeping_adjust()
2035 (long)tk->tkr_mono.clock->mult + tk->tkr_mono.clock->maxadj); in timekeeping_adjust()
2048 if (unlikely((s64)tk->tkr_mono.xtime_nsec < 0)) { in timekeeping_adjust()
2049 tk->tkr_mono.xtime_nsec += (u64)NSEC_PER_SEC << in timekeeping_adjust()
2050 tk->tkr_mono.shift; in timekeeping_adjust()
2065 u64 nsecps = (u64)NSEC_PER_SEC << tk->tkr_mono.shift; in accumulate_nsecs_to_secs()
2068 while (tk->tkr_mono.xtime_nsec >= nsecps) { in accumulate_nsecs_to_secs()
2071 tk->tkr_mono.xtime_nsec -= nsecps; in accumulate_nsecs_to_secs()
2124 tk->tkr_mono.cycle_last += interval; in logarithmic_accumulation()
2127 tk->tkr_mono.xtime_nsec += tk->xtime_interval << shift; in logarithmic_accumulation()
2165 offset = clocksource_delta(tk_clock_read(&tk->tkr_mono), in timekeeping_advance()
2166 tk->tkr_mono.cycle_last, tk->tkr_mono.mask); in timekeeping_advance()
2319 base = tk->tkr_mono.base; in ktime_get_update_offsets_now()
2320 nsecs = timekeeping_get_ns(&tk->tkr_mono); in ktime_get_update_offsets_now()
2410 struct tk_read_base *tkr = &tk_core.timekeeper.tkr_mono; in random_get_entropy_fallback()