Lines Matching refs:offset_nsec
510 static void sched_sync_hw_clock(unsigned long offset_nsec, bool retry)
515 exp = ktime_add_ns(exp, 2ULL * NSEC_PER_SEC - offset_nsec);
517 exp = ktime_add_ns(exp, SYNC_PERIOD_NS - offset_nsec);
581 static int update_rtc(struct timespec64 *to_set, unsigned long *offset_nsec)
595 if (*offset_nsec == rtc->set_offset_nsec) {
600 *offset_nsec = rtc->set_offset_nsec;
608 static inline int update_rtc(struct timespec64 *to_set, unsigned long *offset_nsec)
629 static unsigned long offset_nsec = NSEC_PER_SEC / 2;
643 if (!rtc_tv_nsec_ok(offset_nsec, &to_set, &now))
656 res = update_rtc(&to_set, &offset_nsec);
660 sched_sync_hw_clock(offset_nsec, res != 0);