diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2008-11-18 15:25:17 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-03-16 14:10:40 -0400 |
commit | dcdf3a293522e6ef09d8b3650ac1ceec56438e5d (patch) | |
tree | d890d29cd098f39aa742c16eec404e90ef6bd1bc /arch/m68k/mm | |
parent | 521cb40b0c44418a4fd36dc633f575813d59a43d (diff) |
m68k: Add helper function handle_kernel_fault()
Add helper function handle_kernel_fault() in signal.c, so frame_extra_sizes
can become static, and to avoid future code duplication.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r-- | arch/m68k/mm/fault.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index a96394a0333d..2db6099784ba 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/pgalloc.h> | 18 | #include <asm/pgalloc.h> |
19 | 19 | ||
20 | extern void die_if_kernel(char *, struct pt_regs *, long); | 20 | extern void die_if_kernel(char *, struct pt_regs *, long); |
21 | extern const int frame_extra_sizes[]; /* in m68k/kernel/signal.c */ | ||
22 | 21 | ||
23 | int send_fault_sig(struct pt_regs *regs) | 22 | int send_fault_sig(struct pt_regs *regs) |
24 | { | 23 | { |
@@ -35,21 +34,8 @@ int send_fault_sig(struct pt_regs *regs) | |||
35 | force_sig_info(siginfo.si_signo, | 34 | force_sig_info(siginfo.si_signo, |
36 | &siginfo, current); | 35 | &siginfo, current); |
37 | } else { | 36 | } else { |
38 | const struct exception_table_entry *fixup; | 37 | if (handle_kernel_fault(regs)) |
39 | |||
40 | /* Are we prepared to handle this kernel fault? */ | ||
41 | if ((fixup = search_exception_tables(regs->pc))) { | ||
42 | struct pt_regs *tregs; | ||
43 | /* Create a new four word stack frame, discarding the old | ||
44 | one. */ | ||
45 | regs->stkadj = frame_extra_sizes[regs->format]; | ||
46 | tregs = (struct pt_regs *)((ulong)regs + regs->stkadj); | ||
47 | tregs->vector = regs->vector; | ||
48 | tregs->format = 0; | ||
49 | tregs->pc = fixup->fixup; | ||
50 | tregs->sr = regs->sr; | ||
51 | return -1; | 38 | return -1; |
52 | } | ||
53 | 39 | ||
54 | //if (siginfo.si_signo == SIGBUS) | 40 | //if (siginfo.si_signo == SIGBUS) |
55 | // force_sig_info(siginfo.si_signo, | 41 | // force_sig_info(siginfo.si_signo, |