]> git.karo-electronics.de Git - linux-beck.git/commit
time: Condense timekeeper.xtime into xtime_sec
authorJohn Stultz <john.stultz@linaro.org>
Fri, 13 Jul 2012 05:21:53 +0000 (01:21 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 15 Jul 2012 08:39:06 +0000 (10:39 +0200)
commit1e75fa8be9fb61e1af46b5b3b176347a4c958ca1
treeb353cf5c5ae0c17e7813d7e1e86a403227b35fc7
parentfee84c43e6afc42295ae8058cbbef9ea5633926c
time: Condense timekeeper.xtime into xtime_sec

The timekeeper struct has a xtime_nsec, which keeps the
sub-nanosecond remainder.  This ends up being somewhat
duplicative of the timekeeper.xtime.tv_nsec value, and we
have to do extra work to keep them apart, copying the full
nsec portion out and back in over and over.

This patch simplifies some of the logic by taking the timekeeper
xtime value and splitting it into timekeeper.xtime_sec and
reuses the timekeeper.xtime_nsec for the sub-second portion
(stored in higher res shifted nanoseconds).

This simplifies some of the accumulation logic. And will
allow for more accurate timekeeping once the vsyscall code
is updated to use the shifted nanosecond remainder.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Link: http://lkml.kernel.org/r/1342156917-25092-5-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/timekeeping.c