android_kernel_motorola_sm6225/kernel/time
David P. Reed fa6a1a554b ntp: fix typo that makes sync_cmos_clock erratic
Fix a typo in ntp.c that has caused updating of the persistent (RTC)
clock when synced to NTP to behave erratically.

When debugging a freeze that arises on my AMD64 machines when I
run the ntpd service, I added a number of printk's to monitor the
sync_cmos_clock procedure.  I discovered that it was not syncing to
cmos RTC every 11 minutes as documented, but instead would keep trying
every second for hours at a time.  The reason turned out to be a typo
in sync_cmos_clock, where it attempts to ensure that
update_persistent_clock is called very close to 500 msec. after a 1
second boundary (required by the PC RTC's spec). That typo referred to
"xtime" in one spot, rather than "now", which is derived from "xtime"
but not equal to it.  This makes the test erratic, creating a
"coin-flip" that decides when update_persistent_clock is called - when
it is called, which is rarely, it may be at any time during the one
second period, rather than close to 500 msec, so the value written is
needlessly incorrect, too.

Signed-off-by: David P. Reed
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-17 16:27:01 +01:00
..
clockevents.c clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
clocksource.c kernel/time/clocksource.c: Use list_for_each_entry instead of list_for_each 2007-10-19 11:53:38 -07:00
jiffies.c [PATCH] fix jiffies clocksource inittime 2007-04-04 21:12:47 -07:00
Kconfig clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
Makefile clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
ntp.c ntp: fix typo that makes sync_cmos_clock erratic 2007-11-17 16:27:01 +01:00
tick-broadcast.c time: fix inconsistent function names in comments 2007-11-05 15:12:33 -08:00
tick-common.c clockevents: introduce force broadcast notifier 2007-10-14 22:57:45 +02:00
tick-internal.h highres/dyntick: prevent xtime lock contention 2007-05-08 11:15:10 -07:00
tick-oneshot.c highres: improve debug output 2007-07-21 17:49:15 -07:00
tick-sched.c time: fix inconsistent function names in comments 2007-11-05 15:12:33 -08:00
timekeeping.c kernel/time/timekeeping.c: cleanups 2007-10-17 08:42:53 -07:00
timer_list.c timer_list: Fix printk format strings 2007-10-29 09:39:38 +01:00
timer_stats.c Fix timer_stats printout of events/sec 2007-10-07 16:28:43 -07:00