summaryrefslogtreecommitdiff
path: root/arch/xtensa/kernel/time.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-08-14 17:47:31 +0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-15 12:55:46 +0400
commitd4f587c67fc39e0030ddd718675e252e208da4d7 (patch)
tree2222681c57966cc6b8404afdff3ab1a09ac7ea69 /arch/xtensa/kernel/time.c
parent75c5158f70c065b9704b924503d96e8297838f79 (diff)
downloadlinux-d4f587c67fc39e0030ddd718675e252e208da4d7.tar.xz
timekeeping: Increase granularity of read_persistent_clock()
The persistent clock of some architectures (e.g. s390) have a better granularity than seconds. To reduce the delta between the host clock and the guest clock in a virtualized system change the read_persistent_clock function to return a struct timespec. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Daniel Walker <dwalker@fifo99.com> LKML-Reference: <20090814134811.013873340@de.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/xtensa/kernel/time.c')
-rw-r--r--arch/xtensa/kernel/time.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 8848120d291b..19085ff0484a 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -59,9 +59,8 @@ static struct irqaction timer_irqaction = {
void __init time_init(void)
{
- xtime.tv_nsec = 0;
- xtime.tv_sec = read_persistent_clock();
-
+ /* FIXME: xtime&wall_to_monotonic are set in timekeeping_init. */
+ read_persistent_clock(&xtime);
set_normalized_timespec(&wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);