Commit 2c332a251302873cf8301c2aad27737b6df70255
Committed by
Linus Torvalds
1 parent
cff65c4f0e
Exists in
master
and in
7 other branches
[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>
Showing 2 changed files with 13 additions and 4 deletions Side-by-side Diff
arch/um/kernel/time_kern.c
... | ... | @@ -84,12 +84,11 @@ |
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(®s.regs) = (struct sigcontext *) (&sig + 1)), | |
91 | + CHOOSE_MODE((void) (UPT_SC(®s.regs) = sc), | |
93 | 92 | (void) (regs.regs.skas.is_user = 0)); |
94 | 93 | do_timer(®s); |
95 | 94 | } |
arch/um/os-Linux/signal.c
... | ... | @@ -12,7 +12,6 @@ |
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" |
... | ... | @@ -47,6 +46,17 @@ |
47 | 46 | |
48 | 47 | if(sig == SIGALRM) |
49 | 48 | switch_timers(1); |
49 | +} | |
50 | + | |
51 | +extern void do_boot_timer_handler(struct sigcontext * sc); | |
52 | + | |
53 | +void boot_timer_handler(ARCH_SIGHDLR_PARAM) | |
54 | +{ | |
55 | + struct sigcontext *sc; | |
56 | + | |
57 | + ARCH_GET_SIGCONTEXT(sc, sig); | |
58 | + | |
59 | + do_boot_timer_handler(sc); | |
50 | 60 | } |
51 | 61 | |
52 | 62 | void set_sigstack(void *sig_stack, int size) |