timer: add initial support for RTC seconds locking
authorAlan Cox <alan@linux.intel.com>
Mon, 22 Dec 2014 12:39:17 +0000 (12:39 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 22 Dec 2014 12:39:17 +0000 (12:39 +0000)
commit9ca333107a8a873291b41b900b6ec873fd53636f
tree625e33398be49024339b16fdb9ebc61bc9f7dd8a
parent73f74619710e9cf9f2bdfeb2bc78d693e7629284
timer: add initial support for RTC seconds locking

We don't try and use the RTC as our actual clock. Many RTCs are not Y2K safe
or have their own interesting sets of problems. We would also have to keep
doing Unix type v RTC time conversion maths.

Instead we treat the RTC seconds as a free running counter and update our
second tick as we see the RTC one shift. This also gives us up to 59 seconds
of 'overrun' which should do for the worst case disk I/O problems.
Kernel/include/kernel.h
Kernel/timer.c