From 592913ecb87a9e06f98ddb55b298f1a66bf94c6b Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 13 Jul 2010 17:56:20 -0700 Subject: time: Kill off CONFIG_GENERIC_TIME Now that all arches have been converted over to use generic time via clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME config option and simplify the generic code. Signed-off-by: John Stultz LKML-Reference: <1279068988-21864-4-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner --- arch/um/Kconfig.common | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/um') diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index 0d207e7..7c8e277 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common @@ -55,10 +55,6 @@ config GENERIC_BUG default y depends on BUG -config GENERIC_TIME - bool - default y - config GENERIC_CLOCKEVENTS bool default y -- cgit v1.1 From 9f31f5774961a735687fee17953ab505b3df3abf Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 13 Jul 2010 17:56:24 -0700 Subject: 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 Cc: Jeff Dike LKML-Reference: <1279068988-21864-8-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner --- arch/um/kernel/time.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'arch/um') diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index c8b9c46..2b8b262 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -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; } -- cgit v1.1 From b29230769e3482bbd62a07d6d9485371ee66a18f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 3 Aug 2010 20:34:48 +0200 Subject: um: Fix read_persistent_clock fallout commit 9f31f57(um: Convert to use read_persistent_clock) moved the code, but not the variable. Signed-off-by: Thomas Gleixner --- arch/um/kernel/time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'arch/um') diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 2b8b262..a08d9fa 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -104,15 +104,14 @@ static void __init setup_itimer(void) void read_persistent_clock(struct timespec *ts) { - nsecs = os_nsecs(); + long long 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(); late_time_init = setup_itimer; } -- cgit v1.1