From: Bodo Stroesser Date: Thu, 19 Jan 2006 01:42:43 +0000 (-0800) Subject: [PATCH] uml: change interface to boot_timer_handler X-Git-Tag: v2.6.16-rc2~332 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c332a251302873cf8301c2aad27737b6df70255;p=linux-2.6 [PATCH] uml: change interface to boot_timer_handler Current implementation of boot_timer_handler isn't usable for s390. So I changed its name to do_boot_timer_handler, taking (struct sigcontext *)sc as argument. do_boot_timer_handler is called from new boot_timer_handler() in arch/um/os-Linux/signal.c, which uses the same mechanisms as other signal handler to find out sigcontext pointer. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 6712ffad02..6fa4e1b892 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c @@ -84,12 +84,11 @@ void timer_irq(union uml_pt_regs *regs) } } -void boot_timer_handler(int sig) +void do_boot_timer_handler(struct sigcontext * sc) { struct pt_regs regs; - CHOOSE_MODE((void) - (UPT_SC(®s.regs) = (struct sigcontext *) (&sig + 1)), + CHOOSE_MODE((void) (UPT_SC(®s.regs) = sc), (void) (regs.regs.skas.is_user = 0)); do_timer(®s); } diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index da474a797f..884e457519 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c @@ -12,7 +12,6 @@ #include #include #include "user_util.h" -#include "kern_util.h" #include "user.h" #include "signal_kern.h" #include "sysdep/sigcontext.h" @@ -49,6 +48,17 @@ void alarm_handler(ARCH_SIGHDLR_PARAM) switch_timers(1); } +extern void do_boot_timer_handler(struct sigcontext * sc); + +void boot_timer_handler(ARCH_SIGHDLR_PARAM) +{ + struct sigcontext *sc; + + ARCH_GET_SIGCONTEXT(sc, sig); + + do_boot_timer_handler(sc); +} + void set_sigstack(void *sig_stack, int size) { stack_t stack = ((stack_t) { .ss_flags = 0,