diff options
author | John Stultz <johnstul@us.ibm.com> | 2010-07-13 20:56:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-07-27 06:40:55 -0400 |
commit | 9f31f5774961a735687fee17953ab505b3df3abf (patch) | |
tree | 20c01e57d95c2c1afa050689b1ec234a8862c980 /arch/um | |
parent | 7615856ebfee52b080c22d263ca4debbd0df0ac1 (diff) |
um: Convert to use read_persistent_clock
This patch converts the um arch to use read_persistent_clock().
This allows it to avoid accessing xtime and wall_to_monotonic
directly.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
LKML-Reference: <1279068988-21864-8-git-send-email-johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/time.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index c8b9c469fcd7..2b8b262e5c23 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -102,16 +102,17 @@ static void __init setup_itimer(void) | |||
102 | clockevents_register_device(&itimer_clockevent); | 102 | clockevents_register_device(&itimer_clockevent); |
103 | } | 103 | } |
104 | 104 | ||
105 | void read_persistent_clock(struct timespec *ts) | ||
106 | { | ||
107 | nsecs = os_nsecs(); | ||
108 | set_normalized_timespec(ts, nsecs / NSEC_PER_SEC, | ||
109 | nsecs % NSEC_PER_SEC); | ||
110 | } | ||
111 | |||
105 | void __init time_init(void) | 112 | void __init time_init(void) |
106 | { | 113 | { |
107 | long long nsecs; | 114 | long long nsecs; |
108 | 115 | ||
109 | timer_init(); | 116 | timer_init(); |
110 | |||
111 | nsecs = os_nsecs(); | ||
112 | set_normalized_timespec(&wall_to_monotonic, -nsecs / NSEC_PER_SEC, | ||
113 | -nsecs % NSEC_PER_SEC); | ||
114 | set_normalized_timespec(&xtime, nsecs / NSEC_PER_SEC, | ||
115 | nsecs % NSEC_PER_SEC); | ||
116 | late_time_init = setup_itimer; | 117 | late_time_init = setup_itimer; |
117 | } | 118 | } |