[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>
This commit is contained in:
committed by
Linus Torvalds
parent
6d1b18b16f
commit
27aa6ef3c0
@@ -87,7 +87,6 @@ extern void timer_irq(union uml_pt_regs *regs);
|
|||||||
extern void unprotect_stack(unsigned long stack);
|
extern void unprotect_stack(unsigned long stack);
|
||||||
extern void do_uml_exitcalls(void);
|
extern void do_uml_exitcalls(void);
|
||||||
extern int attach_debugger(int idle_pid, int pid, int stop);
|
extern int attach_debugger(int idle_pid, int pid, int stop);
|
||||||
extern void bad_segv(struct faultinfo fi, unsigned long ip);
|
|
||||||
extern int config_gdb(char *str);
|
extern int config_gdb(char *str);
|
||||||
extern int remove_gdb(void);
|
extern int remove_gdb(void);
|
||||||
extern char *uml_strdup(char *string);
|
extern char *uml_strdup(char *string);
|
||||||
@@ -103,8 +102,6 @@ extern int clear_user_proc(void *buf, int size);
|
|||||||
extern int copy_to_user_proc(void *to, void *from, int size);
|
extern int copy_to_user_proc(void *to, void *from, int size);
|
||||||
extern int copy_from_user_proc(void *to, void *from, int size);
|
extern int copy_from_user_proc(void *to, void *from, int size);
|
||||||
extern int strlen_user_proc(char *str);
|
extern int strlen_user_proc(char *str);
|
||||||
extern void bus_handler(int sig, union uml_pt_regs *regs);
|
|
||||||
extern void winch(int sig, union uml_pt_regs *regs);
|
|
||||||
extern long execute_syscall(void *r);
|
extern long execute_syscall(void *r);
|
||||||
extern int smp_sigio_handler(void);
|
extern int smp_sigio_handler(void);
|
||||||
extern void *get_current(void);
|
extern void *get_current(void);
|
||||||
@@ -119,7 +116,6 @@ extern void time_init_kern(void);
|
|||||||
|
|
||||||
/* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
|
/* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
|
||||||
extern int __cant_sleep(void);
|
extern int __cant_sleep(void);
|
||||||
extern void segv_handler(int sig, union uml_pt_regs *regs);
|
|
||||||
extern void sigio_handler(int sig, union uml_pt_regs *regs);
|
extern void sigio_handler(int sig, union uml_pt_regs *regs);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -128,7 +128,18 @@ out_of_memory:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void segv_handler(int sig, union uml_pt_regs *regs)
|
static void bad_segv(struct faultinfo fi, unsigned long ip)
|
||||||
|
{
|
||||||
|
struct siginfo si;
|
||||||
|
|
||||||
|
si.si_signo = SIGSEGV;
|
||||||
|
si.si_code = SEGV_ACCERR;
|
||||||
|
si.si_addr = (void __user *) FAULT_ADDRESS(fi);
|
||||||
|
current->thread.arch.faultinfo = fi;
|
||||||
|
force_sig_info(SIGSEGV, &si, current);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void segv_handler(int sig, union uml_pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct faultinfo * fi = UPT_FAULTINFO(regs);
|
struct faultinfo * fi = UPT_FAULTINFO(regs);
|
||||||
|
|
||||||
@@ -205,17 +216,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bad_segv(struct faultinfo fi, unsigned long ip)
|
|
||||||
{
|
|
||||||
struct siginfo si;
|
|
||||||
|
|
||||||
si.si_signo = SIGSEGV;
|
|
||||||
si.si_code = SEGV_ACCERR;
|
|
||||||
si.si_addr = (void __user *) FAULT_ADDRESS(fi);
|
|
||||||
current->thread.arch.faultinfo = fi;
|
|
||||||
force_sig_info(SIGSEGV, &si, current);
|
|
||||||
}
|
|
||||||
|
|
||||||
void relay_signal(int sig, union uml_pt_regs *regs)
|
void relay_signal(int sig, union uml_pt_regs *regs)
|
||||||
{
|
{
|
||||||
if(arch_handle_signal(sig, regs))
|
if(arch_handle_signal(sig, regs))
|
||||||
@@ -232,14 +232,14 @@ void relay_signal(int sig, union uml_pt_regs *regs)
|
|||||||
force_sig(sig, current);
|
force_sig(sig, current);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bus_handler(int sig, union uml_pt_regs *regs)
|
static void bus_handler(int sig, union uml_pt_regs *regs)
|
||||||
{
|
{
|
||||||
if(current->thread.fault_catcher != NULL)
|
if(current->thread.fault_catcher != NULL)
|
||||||
do_longjmp(current->thread.fault_catcher, 1);
|
do_longjmp(current->thread.fault_catcher, 1);
|
||||||
else relay_signal(sig, regs);
|
else relay_signal(sig, regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void winch(int sig, union uml_pt_regs *regs)
|
static void winch(int sig, union uml_pt_regs *regs)
|
||||||
{
|
{
|
||||||
do_IRQ(WINCH_IRQ, regs);
|
do_IRQ(WINCH_IRQ, regs);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user