diff options
40 files changed, 80 insertions, 51 deletions
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index 3328af7c2776..af2994206b4b 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c @@ -13,7 +13,7 @@ #include <linux/sched.h> #include <linux/tty.h> #include <linux/delay.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/kallsyms.h> #include <linux/ratelimit.h> diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index 83e9eee57a55..47948b4dd157 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c @@ -22,7 +22,7 @@ #include <linux/mman.h> #include <linux/smp.h> #include <linux/interrupt.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *); diff --git a/arch/arc/mm/extable.c b/arch/arc/mm/extable.c index aa652e281324..c86906b41bfe 100644 --- a/arch/arc/mm/extable.c +++ b/arch/arc/mm/extable.c @@ -8,7 +8,8 @@ * Borrowed heavily from MIPS */ -#include <linux/module.h> +#include <linux/export.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/arm/mm/extable.c b/arch/arm/mm/extable.c index 312e15e6d00b..f436f7439e46 100644 --- a/arch/arm/mm/extable.c +++ b/arch/arm/mm/extable.c @@ -1,7 +1,7 @@ /* * linux/arch/arm/mm/extable.c */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 0122ad1a6027..c2b5b9892fd1 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -8,7 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/signal.h> #include <linux/mm.h> #include <linux/hardirq.h> diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c index d79666aefd71..ad6174e217c9 100644 --- a/arch/cris/arch-v32/kernel/traps.c +++ b/arch/cris/arch-v32/kernel/traps.c @@ -3,7 +3,7 @@ */ #include <linux/ptrace.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> #include <hwregs/supp_reg.h> #include <hwregs/intr_vect_defs.h> diff --git a/arch/frv/mm/extable.c b/arch/frv/mm/extable.c index 9a641c1b085a..a0e8b3e03e4c 100644 --- a/arch/frv/mm/extable.c +++ b/arch/frv/mm/extable.c @@ -2,7 +2,7 @@ * linux/arch/frv/mm/extable.c */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/spinlock.h> #include <linux/uaccess.h> diff --git a/arch/hexagon/mm/vm_fault.c b/arch/hexagon/mm/vm_fault.c index de863d6d802b..489875fd2be4 100644 --- a/arch/hexagon/mm/vm_fault.c +++ b/arch/hexagon/mm/vm_fault.c @@ -29,7 +29,7 @@ #include <linux/uaccess.h> #include <linux/mm.h> #include <linux/signal.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/hardirq.h> /* diff --git a/arch/ia64/include/asm/exception.h b/arch/ia64/include/asm/exception.h new file mode 100644 index 000000000000..6bb246dcdaeb --- /dev/null +++ b/arch/ia64/include/asm/exception.h @@ -0,0 +1,35 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __ASM_EXCEPTION_H +#define __ASM_EXCEPTION_H + +struct pt_regs; +struct exception_table_entry; + +extern void ia64_handle_exception(struct pt_regs *regs, + const struct exception_table_entry *e); + +#define ia64_done_with_exception(regs) \ +({ \ + int __ex_ret = 0; \ + const struct exception_table_entry *e; \ + e = search_exception_tables((regs)->cr_iip + ia64_psr(regs)->ri); \ + if (e) { \ + ia64_handle_exception(regs, e); \ + __ex_ret = 1; \ + } \ + __ex_ret; \ +}) + +#endif /* __ASM_EXCEPTION_H */ diff --git a/arch/ia64/include/asm/uaccess.h b/arch/ia64/include/asm/uaccess.h index bfe13196f770..471044be2a3b 100644 --- a/arch/ia64/include/asm/uaccess.h +++ b/arch/ia64/include/asm/uaccess.h @@ -353,21 +353,6 @@ struct exception_table_entry { int fixup; /* location-relative continuation addr.; if bit 2 is set, r9 is set to 0 */ }; -extern void ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e); -extern const struct exception_table_entry *search_exception_tables (unsigned long addr); - -static inline int -ia64_done_with_exception (struct pt_regs *regs) -{ - const struct exception_table_entry *e; - e = search_exception_tables(regs->cr_iip + ia64_psr(regs)->ri); - if (e) { - ia64_handle_exception(regs, e); - return 1; - } - return 0; -} - #define ARCH_HAS_TRANSLATE_MEM_PTR 1 static __inline__ void * xlate_dev_mem_ptr(phys_addr_t p) diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 45ff27e9edbb..f5f3a5e6fcd1 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -28,12 +28,12 @@ #include <linux/string.h> #include <linux/slab.h> #include <linux/preempt.h> -#include <linux/moduleloader.h> +#include <linux/extable.h> #include <linux/kdebug.h> #include <asm/pgtable.h> #include <asm/sections.h> -#include <linux/uaccess.h> +#include <asm/exception.h> extern void jprobe_inst_return(void); diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 095bfaff82d0..8981ce98afb3 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c @@ -12,16 +12,18 @@ #include <linux/sched.h> #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ -#include <linux/module.h> /* for EXPORT_SYMBOL */ +#include <linux/export.h> +#include <linux/extable.h> #include <linux/hardirq.h> #include <linux/kprobes.h> #include <linux/delay.h> /* for ssleep() */ #include <linux/kdebug.h> +#include <linux/uaccess.h> #include <asm/fpswa.h> #include <asm/intrinsics.h> #include <asm/processor.h> -#include <linux/uaccess.h> +#include <asm/exception.h> #include <asm/setup.h> fpswa_interface_t *fpswa_interface; diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 9cd01c2200ee..99348d7f2255 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c @@ -17,12 +17,14 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/tty.h> +#include <linux/extable.h> #include <linux/ratelimit.h> +#include <linux/uaccess.h> #include <asm/intrinsics.h> #include <asm/processor.h> #include <asm/rse.h> -#include <linux/uaccess.h> +#include <asm/exception.h> #include <asm/unaligned.h> extern int die_if_kernel(char *str, struct pt_regs *regs, long err); diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index fa6ad95e992e..7f2feb21753c 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c @@ -7,6 +7,7 @@ #include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/extable.h> #include <linux/interrupt.h> #include <linux/kprobes.h> #include <linux/kdebug.h> @@ -15,6 +16,7 @@ #include <asm/pgtable.h> #include <asm/processor.h> +#include <asm/exception.h> extern int die(char *, struct pt_regs *, long); diff --git a/arch/m32r/mm/extable.c b/arch/m32r/mm/extable.c index 40ccf80d29cf..8ac8ba6ef60c 100644 --- a/arch/m32r/mm/extable.c +++ b/arch/m32r/mm/extable.c @@ -2,7 +2,7 @@ * linux/arch/m32r/mm/extable.c */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index a3785d3644c2..a05dc3184594 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -23,7 +23,7 @@ #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/highmem.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> #include <asm/m32r.h> diff --git a/arch/metag/mm/extable.c b/arch/metag/mm/extable.c index 2a21eaebe84d..3aa90b78b43d 100644 --- a/arch/metag/mm/extable.c +++ b/arch/metag/mm/extable.c @@ -1,5 +1,4 @@ - -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c index abb678ccde6f..f91b30f8aaa8 100644 --- a/arch/microblaze/mm/fault.c +++ b/arch/microblaze/mm/fault.c @@ -17,7 +17,7 @@ * */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/signal.h> #include <linux/sched.h> #include <linux/kernel.h> diff --git a/arch/mn10300/mm/extable.c b/arch/mn10300/mm/extable.c index 305de461cb8f..045a903ee6b9 100644 --- a/arch/mn10300/mm/extable.c +++ b/arch/mn10300/mm/extable.c @@ -8,7 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/spinlock.h> #include <linux/uaccess.h> diff --git a/arch/mn10300/mm/misalignment.c b/arch/mn10300/mm/misalignment.c index 31d04da85743..b39a388825ae 100644 --- a/arch/mn10300/mm/misalignment.c +++ b/arch/mn10300/mm/misalignment.c @@ -8,7 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/string.h> diff --git a/arch/nios2/mm/extable.c b/arch/nios2/mm/extable.c index 4d2fc5a589d0..2574dba0407d 100644 --- a/arch/nios2/mm/extable.c +++ b/arch/nios2/mm/extable.c @@ -8,7 +8,7 @@ * for more details. */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/nios2/mm/fault.c b/arch/nios2/mm/fault.c index affc4eb3f89e..e7a14e1e0d6b 100644 --- a/arch/nios2/mm/fault.c +++ b/arch/nios2/mm/fault.c @@ -21,7 +21,7 @@ #include <linux/ptrace.h> #include <linux/mman.h> #include <linux/mm.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> #include <linux/ptrace.h> diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index a4574cb4b0fb..d29c41bfbffa 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c @@ -23,7 +23,7 @@ #include <linux/init.h> #include <linux/sched.h> #include <linux/kernel.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/kmod.h> #include <linux/string.h> #include <linux/errno.h> diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c index b1a7435e786a..53592a639744 100644 --- a/arch/openrisc/mm/fault.c +++ b/arch/openrisc/mm/fault.c @@ -17,7 +17,7 @@ #include <linux/mm.h> #include <linux/interrupt.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/sched.h> #include <linux/uaccess.h> diff --git a/arch/score/kernel/traps.c b/arch/score/kernel/traps.c index d948a6818961..2b22bcf02c27 100644 --- a/arch/score/kernel/traps.c +++ b/arch/score/kernel/traps.c @@ -23,7 +23,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/sched.h> #include <asm/cacheflush.h> diff --git a/arch/score/mm/extable.c b/arch/score/mm/extable.c index 01ff6445171c..ec871355fc2d 100644 --- a/arch/score/mm/extable.c +++ b/arch/score/mm/extable.c @@ -23,7 +23,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/module.h> +#include <linux/extable.h> int fixup_exception(struct pt_regs *regs) { diff --git a/arch/score/mm/fault.c b/arch/score/mm/fault.c index 995b71e4db4b..b85fad4f0874 100644 --- a/arch/score/mm/fault.c +++ b/arch/score/mm/fault.c @@ -28,7 +28,7 @@ #include <linux/kernel.h> #include <linux/mm.h> #include <linux/mman.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/signal.h> #include <linux/sched.h> #include <linux/string.h> diff --git a/arch/sh/include/asm/uaccess.h b/arch/sh/include/asm/uaccess.h index a38d0c7b818f..c4f0fee812c3 100644 --- a/arch/sh/include/asm/uaccess.h +++ b/arch/sh/include/asm/uaccess.h @@ -192,7 +192,6 @@ struct exception_table_entry { #endif int fixup_exception(struct pt_regs *regs); -const struct exception_table_entry *search_exception_tables(unsigned long addr); extern void *set_exception_table_vec(unsigned int vec, void *handler); diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c index 1653ff64b103..52a5e11247d1 100644 --- a/arch/sh/kernel/kprobes.c +++ b/arch/sh/kernel/kprobes.c @@ -9,7 +9,7 @@ * for more details. */ #include <linux/kprobes.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/ptrace.h> #include <linux/preempt.h> #include <linux/kdebug.h> diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index dfdad72c61ca..9513fa7840aa 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -8,7 +8,8 @@ #include <linux/hardirq.h> #include <linux/kernel.h> #include <linux/kexec.h> -#include <linux/module.h> +#include <linux/extable.h> +#include <linux/module.h> /* print_modules */ #include <asm/unwinder.h> #include <asm/traps.h> diff --git a/arch/sh/mm/extable_32.c b/arch/sh/mm/extable_32.c index 9cfcbb5848e4..24a75d315dcb 100644 --- a/arch/sh/mm/extable_32.c +++ b/arch/sh/mm/extable_32.c @@ -4,7 +4,7 @@ * linux/arch/i386/mm/extable.c */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/sh/mm/extable_64.c b/arch/sh/mm/extable_64.c index 96edaff8c983..b90cdfad2c78 100644 --- a/arch/sh/mm/extable_64.c +++ b/arch/sh/mm/extable_64.c @@ -11,7 +11,7 @@ * for more details. */ #include <linux/rwsem.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> extern unsigned long copy_user_memcpy, copy_user_memcpy_end; diff --git a/arch/sparc/mm/extable.c b/arch/sparc/mm/extable.c index 768a11e6bd4f..db214e9931d9 100644 --- a/arch/sparc/mm/extable.c +++ b/arch/sparc/mm/extable.c @@ -3,6 +3,7 @@ */ #include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> void sort_extable(struct exception_table_entry *start, diff --git a/arch/unicore32/mm/extable.c b/arch/unicore32/mm/extable.c index 6564180eb285..c562046947ba 100644 --- a/arch/unicore32/mm/extable.c +++ b/arch/unicore32/mm/extable.c @@ -9,7 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/uaccess.h> int fixup_exception(struct pt_regs *regs) diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index 6c7f70bcaae3..b656d216a8a8 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/unicore32/mm/fault.c @@ -9,7 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/module.h> +#include <linux/extable.h> #include <linux/signal.h> #include <linux/mm.h> #include <linux/hardirq.h> diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 2725e08ef353..a14df5aa98c8 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c @@ -13,7 +13,7 @@ */ #include <linux/mm.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/hardirq.h> #include <linux/perf_event.h> #include <linux/uaccess.h> diff --git a/include/linux/module.h b/include/linux/module.h index cc7cba219b20..5cddadff2c25 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -18,7 +18,6 @@ #include <linux/moduleparam.h> #include <linux/jump_label.h> #include <linux/export.h> -#include <linux/extable.h> /* only as arch move module.h -> extable.h */ #include <linux/rbtree_latch.h> #include <linux/percpu.h> diff --git a/init/main.c b/init/main.c index 6ced14a3df12..6d98664e843b 100644 --- a/init/main.c +++ b/init/main.c @@ -12,6 +12,7 @@ #define DEBUG /* Enable initcall_debug */ #include <linux/types.h> +#include <linux/extable.h> #include <linux/module.h> #include <linux/proc_fs.h> #include <linux/kernel.h> diff --git a/kernel/extable.c b/kernel/extable.c index e1359474baa5..6b0d09051efb 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -17,6 +17,7 @@ */ #include <linux/ftrace.h> #include <linux/memory.h> +#include <linux/extable.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/init.h> diff --git a/kernel/module.c b/kernel/module.c index e2eec4b47143..1a17ec0c8ae7 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -17,6 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/export.h> +#include <linux/extable.h> #include <linux/moduleloader.h> #include <linux/trace_events.h> #include <linux/init.h> |