aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/time.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-08-14 09:47:31 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-15 04:55:46 -0400
commitd4f587c67fc39e0030ddd718675e252e208da4d7 (patch)
tree2222681c57966cc6b8404afdff3ab1a09ac7ea69 /arch/sh/kernel/time.c
parent75c5158f70c065b9704b924503d96e8297838f79 (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/sh/kernel/time.c')
-rw-r--r--arch/sh/kernel/time.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 9b352a1e3fb4..3f4706aa975e 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -39,11 +39,9 @@ void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
39int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; 39int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
40 40
41#ifdef CONFIG_GENERIC_CMOS_UPDATE 41#ifdef CONFIG_GENERIC_CMOS_UPDATE
42unsigned long read_persistent_clock(void) 42void read_persistent_clock(struct timespec *ts)
43{ 43{
44 struct timespec tv; 44 rtc_sh_get_time(&ts);
45 rtc_sh_get_time(&tv);
46 return tv.tv_sec;
47} 45}
48 46
49int update_persistent_clock(struct timespec now) 47int update_persistent_clock(struct timespec now)