Lines Matching refs:ts
131 struct timespec64 ts; in tk_xtime() local
133 ts.tv_sec = tk->xtime_sec; in tk_xtime()
134 ts.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); in tk_xtime()
135 return ts; in tk_xtime()
138 static void tk_set_xtime(struct timekeeper *tk, const struct timespec64 *ts) in tk_set_xtime() argument
140 tk->xtime_sec = ts->tv_sec; in tk_set_xtime()
141 tk->tkr_mono.xtime_nsec = (u64)ts->tv_nsec << tk->tkr_mono.shift; in tk_set_xtime()
144 static void tk_xtime_add(struct timekeeper *tk, const struct timespec64 *ts) in tk_xtime_add() argument
146 tk->xtime_sec += ts->tv_sec; in tk_xtime_add()
147 tk->tkr_mono.xtime_nsec += (u64)ts->tv_nsec << tk->tkr_mono.shift; in tk_xtime_add()
815 void ktime_get_real_ts64(struct timespec64 *ts) in ktime_get_real_ts64() argument
826 ts->tv_sec = tk->xtime_sec; in ktime_get_real_ts64()
831 ts->tv_nsec = 0; in ktime_get_real_ts64()
832 timespec64_add_ns(ts, nsecs); in ktime_get_real_ts64()
969 void ktime_get_ts64(struct timespec64 *ts) in ktime_get_ts64() argument
980 ts->tv_sec = tk->xtime_sec; in ktime_get_ts64()
986 ts->tv_sec += tomono.tv_sec; in ktime_get_ts64()
987 ts->tv_nsec = 0; in ktime_get_ts64()
988 timespec64_add_ns(ts, nsec + tomono.tv_nsec); in ktime_get_ts64()
1133 struct system_device_crosststamp *ts) in adjust_historical_crosststamp() argument
1154 ktime_sub(ts->sys_monoraw, history->raw)); in adjust_historical_crosststamp()
1172 ktime_sub(ts->sys_realtime, history->real)); in adjust_historical_crosststamp()
1181 ts->sys_monoraw = ktime_add_ns(history->raw, corr_raw); in adjust_historical_crosststamp()
1182 ts->sys_realtime = ktime_add_ns(history->real, corr_real); in adjust_historical_crosststamp()
1184 ts->sys_monoraw = ktime_sub_ns(ts->sys_monoraw, corr_raw); in adjust_historical_crosststamp()
1185 ts->sys_realtime = ktime_sub_ns(ts->sys_realtime, corr_real); in adjust_historical_crosststamp()
1321 int do_settimeofday64(const struct timespec64 *ts) in do_settimeofday64() argument
1328 if (!timespec64_valid_settod(ts)) in do_settimeofday64()
1337 ts_delta = timespec64_sub(*ts, xt); in do_settimeofday64()
1346 tk_set_xtime(tk, ts); in do_settimeofday64()
1358 add_device_randomness(ts, sizeof(*ts)); in do_settimeofday64()
1371 static int timekeeping_inject_offset(const struct timespec64 *ts) in timekeeping_inject_offset() argument
1378 if (ts->tv_nsec < 0 || ts->tv_nsec >= NSEC_PER_SEC) in timekeeping_inject_offset()
1387 tmp = timespec64_add(tk_xtime(tk), *ts); in timekeeping_inject_offset()
1388 if (timespec64_compare(&tk->wall_to_monotonic, ts) > 0 || in timekeeping_inject_offset()
1394 tk_xtime_add(tk, ts); in timekeeping_inject_offset()
1395 tk_set_wall_to_mono(tk, timespec64_sub(tk->wall_to_monotonic, *ts)); in timekeeping_inject_offset()
1526 void ktime_get_raw_ts64(struct timespec64 *ts) in ktime_get_raw_ts64() argument
1534 ts->tv_sec = tk->raw_sec; in ktime_get_raw_ts64()
1539 ts->tv_nsec = 0; in ktime_get_raw_ts64()
1540 timespec64_add_ns(ts, nsecs); in ktime_get_raw_ts64()
1593 void __weak read_persistent_clock64(struct timespec64 *ts) in read_persistent_clock64() argument
1595 ts->tv_sec = 0; in read_persistent_clock64()
1596 ts->tv_nsec = 0; in read_persistent_clock64()
2095 struct timespec64 ts; in accumulate_nsecs_to_secs() local
2099 ts.tv_sec = leap; in accumulate_nsecs_to_secs()
2100 ts.tv_nsec = 0; in accumulate_nsecs_to_secs()
2102 timespec64_sub(tk->wall_to_monotonic, ts)); in accumulate_nsecs_to_secs()
2255 void getboottime64(struct timespec64 *ts) in getboottime64() argument
2260 *ts = ktime_to_timespec64(t); in getboottime64()
2264 void ktime_get_coarse_real_ts64(struct timespec64 *ts) in ktime_get_coarse_real_ts64() argument
2272 *ts = tk_xtime(tk); in ktime_get_coarse_real_ts64()
2277 void ktime_get_coarse_ts64(struct timespec64 *ts) in ktime_get_coarse_ts64() argument
2290 set_normalized_timespec64(ts, now.tv_sec + mono.tv_sec, in ktime_get_coarse_ts64()
2436 struct timespec64 ts; in do_adjtimex() local
2462 ktime_get_real_ts64(&ts); in do_adjtimex()
2463 add_device_randomness(&ts, sizeof(ts)); in do_adjtimex()
2469 ret = __do_adjtimex(txc, &ts, &tai, &ad); in do_adjtimex()