Skip to content

Commit

Permalink
um: Convert to use read_persistent_clock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Stultz authored and Thomas Gleixner committed Jul 27, 2010
1 parent 7615856 commit 9f31f57
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arch/um/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,17 @@ static void __init setup_itimer(void)
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)
{
long long nsecs;

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;
}

0 comments on commit 9f31f57

Please sign in to comment.