diff options
author | john stultz <johnstul@us.ibm.com> | 2007-07-25 02:47:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-25 19:09:20 +0200 |
commit | 2c6b47de17c75d553de3e2fb426d8298d2074585 (patch) | |
tree | c8edc3d727d85cb3e1c043583c350a04a133e1a3 /kernel/hrtimer.c | |
parent | Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/gala... (diff) | |
download | linux-2c6b47de17c75d553de3e2fb426d8298d2074585.tar.xz linux-2c6b47de17c75d553de3e2fb426d8298d2074585.zip |
Cleanup non-arch xtime uses, use get_seconds() or current_kernel_time().
This avoids use of the kernel-internal "xtime" variable directly outside
of the actual time-related functions. Instead, use the helper functions
that we already have available to us.
This doesn't actually change any behaviour, but this will allow us to
fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
(because much of the realtime information is maintained as separate
offsets to 'xtime'), which has caused interfaces that use xtime directly
to get a time that is out of sync with the real-time clock by up to a
third of a second or so.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r-- | kernel/hrtimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index eb1ddebd2c04..a7bb05e6cb63 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -144,7 +144,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base) #ifdef CONFIG_NO_HZ getnstimeofday(&xts); #else - xts = xtime; + xts = current_kernel_time(); #endif tom = wall_to_monotonic; } while (read_seqretry(&xtime_lock, seq)); |