aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 04:44:14 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:22 -0500
commit27aa6ef3c0e8220b27b0a8d2d0bae7cd0a6d2f78 (patch)
tree322d8ee8ad1de886c33c1fda0bdd1c9cbab8a82a /arch
parent6d1b18b16fc917e5c9af568a53c7e37923821d70 (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.h4
-rw-r--r--arch/um/kernel/trap.c28
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);
87extern void unprotect_stack(unsigned long stack); 87extern void unprotect_stack(unsigned long stack);
88extern void do_uml_exitcalls(void); 88extern void do_uml_exitcalls(void);
89extern int attach_debugger(int idle_pid, int pid, int stop); 89extern int attach_debugger(int idle_pid, int pid, int stop);
90extern void bad_segv(struct faultinfo fi, unsigned long ip);
91extern int config_gdb(char *str); 90extern int config_gdb(char *str);
92extern int remove_gdb(void); 91extern int remove_gdb(void);
93extern char *uml_strdup(char *string); 92extern char *uml_strdup(char *string);
@@ -103,8 +102,6 @@ extern int clear_user_proc(void *buf, int size);
103extern int copy_to_user_proc(void *to, void *from, int size); 102extern int copy_to_user_proc(void *to, void *from, int size);
104extern int copy_from_user_proc(void *to, void *from, int size); 103extern int copy_from_user_proc(void *to, void *from, int size);
105extern int strlen_user_proc(char *str); 104extern int strlen_user_proc(char *str);
106extern void bus_handler(int sig, union uml_pt_regs *regs);
107extern void winch(int sig, union uml_pt_regs *regs);
108extern long execute_syscall(void *r); 105extern long execute_syscall(void *r);
109extern int smp_sigio_handler(void); 106extern int smp_sigio_handler(void);
110extern void *get_current(void); 107extern 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. */
121extern int __cant_sleep(void); 118extern int __cant_sleep(void);
122extern void segv_handler(int sig, union uml_pt_regs *regs);
123extern void sigio_handler(int sig, union uml_pt_regs *regs); 119extern 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
131void segv_handler(int sig, union uml_pt_regs *regs) 131static 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
142static 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
208void 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
219void relay_signal(int sig, union uml_pt_regs *regs) 219void 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
235void bus_handler(int sig, union uml_pt_regs *regs) 235static 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
242void winch(int sig, union uml_pt_regs *regs) 242static 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}