Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Bodo Stroesser and committed by
Linus Torvalds
2c332a25 cff65c4f

+13 -4
+2 -3
arch/um/kernel/time_kern.c
··· 84 84 } 85 85 } 86 86 87 - void boot_timer_handler(int sig) 87 + void do_boot_timer_handler(struct sigcontext * sc) 88 88 { 89 89 struct pt_regs regs; 90 90 91 - CHOOSE_MODE((void) 92 - (UPT_SC(&regs.regs) = (struct sigcontext *) (&sig + 1)), 91 + CHOOSE_MODE((void) (UPT_SC(&regs.regs) = sc), 93 92 (void) (regs.regs.skas.is_user = 0)); 94 93 do_timer(&regs); 95 94 }
+11 -1
arch/um/os-Linux/signal.c
··· 12 12 #include <string.h> 13 13 #include <sys/mman.h> 14 14 #include "user_util.h" 15 - #include "kern_util.h" 16 15 #include "user.h" 17 16 #include "signal_kern.h" 18 17 #include "sysdep/sigcontext.h" ··· 46 47 47 48 if(sig == SIGALRM) 48 49 switch_timers(1); 50 + } 51 + 52 + extern void do_boot_timer_handler(struct sigcontext * sc); 53 + 54 + void boot_timer_handler(ARCH_SIGHDLR_PARAM) 55 + { 56 + struct sigcontext *sc; 57 + 58 + ARCH_GET_SIGCONTEXT(sc, sig); 59 + 60 + do_boot_timer_handler(sc); 49 61 } 50 62 51 63 void set_sigstack(void *sig_stack, int size)