linux-stable/kernel/time
Ingo Molnar 10dd31a7a1 time: ntp: fix bug in ntp_update_offset() & do_adjtimex()
Impact: change (fix) the way the NTP PLL seconds offset is initialized/tracked

Fix a bug and do a micro-optimization:

When PLL is enabled we do not reset time_reftime. If the PLL
was off for a long time (for example after bootup), this is
arguably the wrong thing to do.

We already had a hack for the common boot-time case in
ntp_update_offset(), in form of:

	if (unlikely(time_status & STA_FREQHOLD || time_reftime == 0))
 		secs = 0;

But the update delta should be reset later on too - not just when
the PLL is enabled for the first time after bootup.

So do it on !STA_PLL -> STA_PLL transitions.

This changes behavior, as previously if ntpd was disabled for
a long time and we restarted it, we'd run from that last update,
with a very large delta.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-25 18:38:13 +01:00
..
clockevents.c cpumask: convert struct clock_event_device to cpumask pointers. 2008-12-13 21:20:26 +10:30
clocksource.c cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/ 2009-01-01 10:12:29 +10:30
jiffies.c trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
Kconfig Kconfig: eliminate "def_bool n" constructs 2008-10-16 11:21:31 -07:00
Makefile clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
ntp.c time: ntp: fix bug in ntp_update_offset() & do_adjtimex() 2009-02-25 18:38:13 +01:00
tick-broadcast.c cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/ 2009-01-01 10:12:29 +10:30
tick-common.c hrtimers: allow the hot-unplugging of all cpus 2009-01-30 22:35:29 +01:00
tick-internal.h NOHZ: restart tick device from irq_enter() 2008-10-17 18:13:38 +02:00
tick-oneshot.c clockevents: remove WARN_ON which was used to gather information 2008-09-09 22:20:01 +02:00
tick-sched.c time-sched.c: tick_nohz_update_jiffies should be static 2009-01-15 12:06:56 +01:00
timekeeping.c sched_clock: prevent scd->clock from moving backwards, take #2 2008-12-31 09:53:21 +01:00
timer_list.c Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2 2008-10-22 09:48:06 +02:00
timer_stats.c kernel: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00