diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-10 04:44:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:22 -0500 |
commit | 27aa6ef3c0e8220b27b0a8d2d0bae7cd0a6d2f78 (patch) | |
tree | 322d8ee8ad1de886c33c1fda0bdd1c9cbab8a82a /arch | |
parent | 6d1b18b16fc917e5c9af568a53c7e37923821d70 (diff) |
[PATCH] uml: make signal handlers static
A bunch of the signal handlers can be made static.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/include/kern_util.h | 4 | ||||
-rw-r--r-- | arch/um/kernel/trap.c | 28 |
2 files changed, 14 insertions, 18 deletions
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 3368ef974379..173af029d12b 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -87,7 +87,6 @@ extern void timer_irq(union uml_pt_regs *regs); | |||
87 | extern void unprotect_stack(unsigned long stack); | 87 | extern void unprotect_stack(unsigned long stack); |
88 | extern void do_uml_exitcalls(void); | 88 | extern void do_uml_exitcalls(void); |
89 | extern int attach_debugger(int idle_pid, int pid, int stop); | 89 | extern int attach_debugger(int idle_pid, int pid, int stop); |
90 | extern void bad_segv(struct faultinfo fi, unsigned long ip); | ||
91 | extern int config_gdb(char *str); | 90 | extern int config_gdb(char *str); |
92 | extern int remove_gdb(void); | 91 | extern int remove_gdb(void); |
93 | extern char *uml_strdup(char *string); | 92 | extern char *uml_strdup(char *string); |
@@ -103,8 +102,6 @@ extern int clear_user_proc(void *buf, int size); | |||
103 | extern int copy_to_user_proc(void *to, void *from, int size); | 102 | extern int copy_to_user_proc(void *to, void *from, int size); |
104 | extern int copy_from_user_proc(void *to, void *from, int size); | 103 | extern int copy_from_user_proc(void *to, void *from, int size); |
105 | extern int strlen_user_proc(char *str); | 104 | extern int strlen_user_proc(char *str); |
106 | extern void bus_handler(int sig, union uml_pt_regs *regs); | ||
107 | extern void winch(int sig, union uml_pt_regs *regs); | ||
108 | extern long execute_syscall(void *r); | 105 | extern long execute_syscall(void *r); |
109 | extern int smp_sigio_handler(void); | 106 | extern int smp_sigio_handler(void); |
110 | extern void *get_current(void); | 107 | extern void *get_current(void); |
@@ -119,7 +116,6 @@ extern void time_init_kern(void); | |||
119 | 116 | ||
120 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ | 117 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ |
121 | extern int __cant_sleep(void); | 118 | extern int __cant_sleep(void); |
122 | extern void segv_handler(int sig, union uml_pt_regs *regs); | ||
123 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | 119 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
124 | 120 | ||
125 | #endif | 121 | #endif |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index b5f124a2f6ae..26f15c458574 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -128,7 +128,18 @@ out_of_memory: | |||
128 | goto out; | 128 | goto out; |
129 | } | 129 | } |
130 | 130 | ||
131 | void segv_handler(int sig, union uml_pt_regs *regs) | 131 | static void bad_segv(struct faultinfo fi, unsigned long ip) |
132 | { | ||
133 | struct siginfo si; | ||
134 | |||
135 | si.si_signo = SIGSEGV; | ||
136 | si.si_code = SEGV_ACCERR; | ||
137 | si.si_addr = (void __user *) FAULT_ADDRESS(fi); | ||
138 | current->thread.arch.faultinfo = fi; | ||
139 | force_sig_info(SIGSEGV, &si, current); | ||
140 | } | ||
141 | |||
142 | static void segv_handler(int sig, union uml_pt_regs *regs) | ||
132 | { | 143 | { |
133 | struct faultinfo * fi = UPT_FAULTINFO(regs); | 144 | struct faultinfo * fi = UPT_FAULTINFO(regs); |
134 | 145 | ||
@@ -205,17 +216,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc) | |||
205 | return(0); | 216 | return(0); |
206 | } | 217 | } |
207 | 218 | ||
208 | void bad_segv(struct faultinfo fi, unsigned long ip) | ||
209 | { | ||
210 | struct siginfo si; | ||
211 | |||
212 | si.si_signo = SIGSEGV; | ||
213 | si.si_code = SEGV_ACCERR; | ||
214 | si.si_addr = (void __user *) FAULT_ADDRESS(fi); | ||
215 | current->thread.arch.faultinfo = fi; | ||
216 | force_sig_info(SIGSEGV, &si, current); | ||
217 | } | ||
218 | |||
219 | void relay_signal(int sig, union uml_pt_regs *regs) | 219 | void relay_signal(int sig, union uml_pt_regs *regs) |
220 | { | 220 | { |
221 | if(arch_handle_signal(sig, regs)) | 221 | if(arch_handle_signal(sig, regs)) |
@@ -232,14 +232,14 @@ void relay_signal(int sig, union uml_pt_regs *regs) | |||
232 | force_sig(sig, current); | 232 | force_sig(sig, current); |
233 | } | 233 | } |
234 | 234 | ||
235 | void bus_handler(int sig, union uml_pt_regs *regs) | 235 | static void bus_handler(int sig, union uml_pt_regs *regs) |
236 | { | 236 | { |
237 | if(current->thread.fault_catcher != NULL) | 237 | if(current->thread.fault_catcher != NULL) |
238 | do_longjmp(current->thread.fault_catcher, 1); | 238 | do_longjmp(current->thread.fault_catcher, 1); |
239 | else relay_signal(sig, regs); | 239 | else relay_signal(sig, regs); |
240 | } | 240 | } |
241 | 241 | ||
242 | void winch(int sig, union uml_pt_regs *regs) | 242 | static void winch(int sig, union uml_pt_regs *regs) |
243 | { | 243 | { |
244 | do_IRQ(WINCH_IRQ, regs); | 244 | do_IRQ(WINCH_IRQ, regs); |
245 | } | 245 | } |