diff options
author | Bodo Stroesser <bstroesser@fujitsu-siemens.com> | 2006-01-18 20:42:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:19 -0500 |
commit | 2c332a251302873cf8301c2aad27737b6df70255 (patch) | |
tree | 8c641abe3d27bf44a7a55f4f6354dc5de7ccc260 /arch/um | |
parent | cff65c4f0ea6662124bbb7bf3806e5df1c6d735d (diff) |
[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>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/time_kern.c | 5 | ||||
-rw-r--r-- | arch/um/os-Linux/signal.c | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 6712ffad0242..6fa4e1b892b7 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) | |||
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 | struct pt_regs regs; | 89 | struct pt_regs regs; |
90 | 90 | ||
91 | CHOOSE_MODE((void) | 91 | CHOOSE_MODE((void) (UPT_SC(®s.regs) = sc), |
92 | (UPT_SC(®s.regs) = (struct sigcontext *) (&sig + 1)), | ||
93 | (void) (regs.regs.skas.is_user = 0)); | 92 | (void) (regs.regs.skas.is_user = 0)); |
94 | do_timer(®s); | 93 | do_timer(®s); |
95 | } | 94 | } |
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index da474a797fbf..884e45751944 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <string.h> | 12 | #include <string.h> |
13 | #include <sys/mman.h> | 13 | #include <sys/mman.h> |
14 | #include "user_util.h" | 14 | #include "user_util.h" |
15 | #include "kern_util.h" | ||
16 | #include "user.h" | 15 | #include "user.h" |
17 | #include "signal_kern.h" | 16 | #include "signal_kern.h" |
18 | #include "sysdep/sigcontext.h" | 17 | #include "sysdep/sigcontext.h" |
@@ -49,6 +48,17 @@ void alarm_handler(ARCH_SIGHDLR_PARAM) | |||
49 | switch_timers(1); | 48 | switch_timers(1); |
50 | } | 49 | } |
51 | 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); | ||
60 | } | ||
61 | |||
52 | void set_sigstack(void *sig_stack, int size) | 62 | void set_sigstack(void *sig_stack, int size) |
53 | { | 63 | { |
54 | stack_t stack = ((stack_t) { .ss_flags = 0, | 64 | stack_t stack = ((stack_t) { .ss_flags = 0, |