timer: handle fast clocks
authorAlan Cox <alan@linux.intel.com>
Thu, 20 Sep 2018 00:54:55 +0000 (01:54 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 20 Sep 2018 00:54:55 +0000 (01:54 +0100)
commitd4a8f0b41b5d7723446afa524a35adb93d8cad6f
treef4b71f6b23553fee6757d25b72c9eb253376362d
parent9c8c90abbb0041f04578b9eed2c3e6b405886e5b
timer: handle fast clocks

On a few systems the timer tick can run too fast (eg it's 0.512 of a second
not 0.5) and we can tick ahead of the RTC time. For robustness treat being
a second ahead of locked time as we do being on time - don't tick again so
we'll slide into time.

We shouldn't end up any further out because the big jumps are only when we
have interrupts off for stuff like floppy disk I/O. In that situation we
will always lose time.
Kernel/timer.c