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