Commit 9f31f577 authored by John Stultz's avatar John Stultz Committed by Thomas Gleixner

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: default avatarJohn 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: default avatarThomas Gleixner <tglx@linutronix.de>
parent 7615856e
...@@ -102,16 +102,17 @@ static void __init setup_itimer(void) ...@@ -102,16 +102,17 @@ static void __init setup_itimer(void)
clockevents_register_device(&itimer_clockevent); clockevents_register_device(&itimer_clockevent);
} }
void read_persistent_clock(struct timespec *ts)
{
nsecs = os_nsecs();
set_normalized_timespec(ts, nsecs / NSEC_PER_SEC,
nsecs % NSEC_PER_SEC);
}
void __init time_init(void) void __init time_init(void)
{ {
long long nsecs; long long nsecs;
timer_init(); timer_init();
nsecs = os_nsecs();
set_normalized_timespec(&wall_to_monotonic, -nsecs / NSEC_PER_SEC,
-nsecs % NSEC_PER_SEC);
set_normalized_timespec(&xtime, nsecs / NSEC_PER_SEC,
nsecs % NSEC_PER_SEC);
late_time_init = setup_itimer; late_time_init = setup_itimer;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment