aboutsummaryrefslogtreecommitdiff
path: root/arch/ppc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-02-20 10:38:56 +1100
committerPaul Mackerras <paulus@samba.org>2006-02-20 10:38:56 +1100
commit092b8f3488a3e50a4ab5f2f3f7c8bbf56b3144e1 (patch)
treefe9aa2dc2de1ed23109ef77ce8bd38120c2d643d /arch/ppc/kernel
parentbd71c2b17468a2531fb4c81ec1d73520845e97e1 (diff)
powerpc: Keep xtime and gettimeofday in sync
This fixes a regression which was introduced by moving ppc32 to use the same sort of lockless gettimeofday as ppc64 has been using for some time. This involves getting the timebase and performing some simple arithmetic to convert it to seconds and microseconds. However, the factor and offset used there weren't being updated when NTP varied the tick length using adjtimex. 64-bit didn't notice the problem because it had a hook in the 32-bit adjtimex compat routine that attempted to work out what the generic timekeeping code would do and alter the factor and offset to match. However, that code was very complex and it wasn't clear that it still matched what the generic code would do. Now we use the generic current_tick_length() routine that was recently added to check that the current tick will be as long as we expect; if not we recompute the factor and offset. This keeps gettimeofday and xtime in sync. In addition we check that gettimeofday hasn't got ahead of xtime on each timer interrupt; if it has, we resync. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/kernel')
0 files changed, 0 insertions, 0 deletions