From aceb343464a136e1c0de5294b097a1f9ab018870 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 10 Jul 2006 04:45:05 -0700 Subject: [PATCH] uml: timer initialization cleanup This cleans up the mess that is the timer initialization. There used to be two timer handlers - one that basically ran during delay loop calibration and one that handled the timer afterwards. There were also two sets of timer initialization code - one that starts in user code and calls into the kernel side of the house, and one that starts in kernel code and calls user code. This eliminates one timer handler and consolidates the two sets of initialization code. [akpm@osdl.org: use new INTF_ flags] Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/time.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'arch/um/os-Linux/time.c') diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index 280c4fb9b58..beb7f9666de 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -81,14 +81,6 @@ void uml_idle_timer(void) set_interval(ITIMER_REAL); } -void time_init(void) -{ - if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) - panic("Couldn't set SIGVTALRM handler"); - set_interval(ITIMER_VIRTUAL); - time_init_kern(); -} - unsigned long long os_nsecs(void) { struct timeval tv; @@ -106,15 +98,7 @@ void idle_sleep(int secs) nanosleep(&ts, NULL); } -/* XXX This partly duplicates init_irq_signals */ - void user_time_init(void) { - set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, - SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, - SIGALRM, SIGUSR2, -1); - set_handler(SIGALRM, (__sighandler_t) alarm_handler, - SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, - SIGVTALRM, SIGUSR2, -1); set_interval(ITIMER_VIRTUAL); } -- cgit v1.2.3 From 9914aee827322f46c306d724b38ad73af7daa9a5 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 10 Jul 2006 04:45:07 -0700 Subject: [PATCH] uml: remove useless declaration wall_to_monotonic isn't used in this file, so we can remove the declaration. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/time.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/um/os-Linux/time.c') diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index beb7f9666de..31fb3235f55 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -17,11 +17,6 @@ #include "kern_constants.h" #include "os.h" -/* XXX This really needs to be declared and initialized in a kernel file since - * it's in - */ -extern struct timespec wall_to_monotonic; - static void set_interval(int timer_type) { int usec = 1000000/hz(); -- cgit v1.2.3 From bacf4549187ddb624a5d89129c7dccc0ca67ce7c Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 10 Jul 2006 04:45:09 -0700 Subject: [PATCH] uml: ifdef a mode-specific function uml_idle_timer is tt-mode only, so ifdef it as such to make it easier to spot when tt mode is killed. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/time.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/um/os-Linux/time.c') diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index 31fb3235f55..4ae73c0e548 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -66,6 +66,7 @@ void switch_timers(int to_real) errno); } +#ifdef UML_CONFIG_MODE_TT void uml_idle_timer(void) { if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR) @@ -75,6 +76,7 @@ void uml_idle_timer(void) SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1); set_interval(ITIMER_REAL); } +#endif unsigned long long os_nsecs(void) { -- cgit v1.2.3