diff options
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/time.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 2b5d9da912a2..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; |