aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/time.c')
-rw-r--r--arch/x86_64/kernel/time.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 66bf6ddeb0c3..7b6abe058253 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -176,10 +176,7 @@ int do_settimeofday(struct timespec *tv)
176 set_normalized_timespec(&xtime, sec, nsec); 176 set_normalized_timespec(&xtime, sec, nsec);
177 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); 177 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
178 178
179 time_adjust = 0; /* stop active adjtime() */ 179 ntp_clear();
180 time_status |= STA_UNSYNC;
181 time_maxerror = NTP_PHASE_LIMIT;
182 time_esterror = NTP_PHASE_LIMIT;
183 180
184 write_sequnlock_irq(&xtime_lock); 181 write_sequnlock_irq(&xtime_lock);
185 clock_was_set(); 182 clock_was_set();
@@ -471,7 +468,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
471 * off) isn't likely to go away much sooner anyway. 468 * off) isn't likely to go away much sooner anyway.
472 */ 469 */
473 470
474 if ((~time_status & STA_UNSYNC) && xtime.tv_sec > rtc_update && 471 if (ntp_synced() && xtime.tv_sec > rtc_update &&
475 abs(xtime.tv_nsec - 500000000) <= tick_nsec / 2) { 472 abs(xtime.tv_nsec - 500000000) <= tick_nsec / 2) {
476 set_rtc_mmss(xtime.tv_sec); 473 set_rtc_mmss(xtime.tv_sec);
477 rtc_update = xtime.tv_sec + 660; 474 rtc_update = xtime.tv_sec + 660;
@@ -1041,6 +1038,7 @@ static int timer_resume(struct sys_device *dev)
1041 write_sequnlock_irqrestore(&xtime_lock,flags); 1038 write_sequnlock_irqrestore(&xtime_lock,flags);
1042 jiffies += sleep_length; 1039 jiffies += sleep_length;
1043 wall_jiffies += sleep_length; 1040 wall_jiffies += sleep_length;
1041 touch_softlockup_watchdog();
1044 return 0; 1042 return 0;
1045} 1043}
1046 1044