aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 5fccc7cbf3b4..78d3fa10fcd6 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -562,12 +562,6 @@ found:
562 562
563/******************************************************************/ 563/******************************************************************/
564 564
565/*
566 * Timekeeping variables
567 */
568unsigned long tick_usec = TICK_USEC; /* USER_HZ period (usec) */
569unsigned long tick_nsec = TICK_NSEC; /* ACTHZ period (nsec) */
570
571/* 565/*
572 * The current time 566 * The current time
573 * wall_to_monotonic is what we need to add to xtime (or xtime corrected 567 * wall_to_monotonic is what we need to add to xtime (or xtime corrected
@@ -757,10 +751,13 @@ void __init timekeeping_init(void)
757 unsigned long flags; 751 unsigned long flags;
758 752
759 write_seqlock_irqsave(&xtime_lock, flags); 753 write_seqlock_irqsave(&xtime_lock, flags);
754
755 ntp_clear();
756
760 clock = clocksource_get_next(); 757 clock = clocksource_get_next();
761 clocksource_calculate_interval(clock, tick_nsec); 758 clocksource_calculate_interval(clock, tick_nsec);
762 clock->cycle_last = clocksource_read(clock); 759 clock->cycle_last = clocksource_read(clock);
763 ntp_clear(); 760
764 write_sequnlock_irqrestore(&xtime_lock, flags); 761 write_sequnlock_irqrestore(&xtime_lock, flags);
765} 762}
766 763