Loading kernel/time/timekeeping.c +19 −17 Original line number Diff line number Diff line Loading @@ -1031,7 +1031,7 @@ void __init timekeeping_init(void) raw_spin_unlock_irqrestore(&timekeeper_lock, flags); } /* time in seconds when suspend began */ /* time in seconds when suspend began for persistent clock */ static struct timespec64 timekeeping_suspend_time; /** Loading Loading @@ -1210,6 +1210,7 @@ static int timekeeping_suspend(void) timekeeping_forward_now(tk); timekeeping_suspended = 1; if (has_persistent_clock()) { /* * To avoid drift caused by repeated suspend/resumes, * which each can add ~1 second drift error, Loading @@ -1221,7 +1222,7 @@ static int timekeeping_suspend(void) if (abs(delta_delta.tv_sec) >= 2) { /* * if delta_delta is too large, assume time correction * has occured and set old_delta to the current delta. * has occurred and set old_delta to the current delta. */ old_delta = delta; } else { Loading @@ -1229,6 +1230,7 @@ static int timekeeping_suspend(void) timekeeping_suspend_time = timespec64_add(timekeeping_suspend_time, delta_delta); } } timekeeping_update(tk, TK_MIRROR); write_seqcount_end(&tk_core.seq); Loading Loading
kernel/time/timekeeping.c +19 −17 Original line number Diff line number Diff line Loading @@ -1031,7 +1031,7 @@ void __init timekeeping_init(void) raw_spin_unlock_irqrestore(&timekeeper_lock, flags); } /* time in seconds when suspend began */ /* time in seconds when suspend began for persistent clock */ static struct timespec64 timekeeping_suspend_time; /** Loading Loading @@ -1210,6 +1210,7 @@ static int timekeeping_suspend(void) timekeeping_forward_now(tk); timekeeping_suspended = 1; if (has_persistent_clock()) { /* * To avoid drift caused by repeated suspend/resumes, * which each can add ~1 second drift error, Loading @@ -1221,7 +1222,7 @@ static int timekeeping_suspend(void) if (abs(delta_delta.tv_sec) >= 2) { /* * if delta_delta is too large, assume time correction * has occured and set old_delta to the current delta. * has occurred and set old_delta to the current delta. */ old_delta = delta; } else { Loading @@ -1229,6 +1230,7 @@ static int timekeeping_suspend(void) timekeeping_suspend_time = timespec64_add(timekeeping_suspend_time, delta_delta); } } timekeeping_update(tk, TK_MIRROR); write_seqcount_end(&tk_core.seq); Loading