diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-08-14 09:47:31 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-15 04:55:46 -0400 |
commit | d4f587c67fc39e0030ddd718675e252e208da4d7 (patch) | |
tree | 2222681c57966cc6b8404afdff3ab1a09ac7ea69 /arch/mips/lasat/ds1603.c | |
parent | 75c5158f70c065b9704b924503d96e8297838f79 (diff) |
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/mips/lasat/ds1603.c')
-rw-r--r-- | arch/mips/lasat/ds1603.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/lasat/ds1603.c b/arch/mips/lasat/ds1603.c index 52cb1436a12a..c6fd96ff118d 100644 --- a/arch/mips/lasat/ds1603.c +++ b/arch/mips/lasat/ds1603.c | |||
@@ -135,7 +135,7 @@ static void rtc_end_op(void) | |||
135 | lasat_ndelay(1000); | 135 | lasat_ndelay(1000); |
136 | } | 136 | } |
137 | 137 | ||
138 | unsigned long read_persistent_clock(void) | 138 | void read_persistent_clock(struct timespec *ts) |
139 | { | 139 | { |
140 | unsigned long word; | 140 | unsigned long word; |
141 | unsigned long flags; | 141 | unsigned long flags; |
@@ -147,7 +147,8 @@ unsigned long read_persistent_clock(void) | |||
147 | rtc_end_op(); | 147 | rtc_end_op(); |
148 | spin_unlock_irqrestore(&rtc_lock, flags); | 148 | spin_unlock_irqrestore(&rtc_lock, flags); |
149 | 149 | ||
150 | return word; | 150 | ts->tv_sec = word; |
151 | ts->tv_nsec = 0; | ||
151 | } | 152 | } |
152 | 153 | ||
153 | int rtc_mips_set_mmss(unsigned long time) | 154 | int rtc_mips_set_mmss(unsigned long time) |