diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/include/asm/exception.h | 35 | ||||
-rw-r--r-- | arch/ia64/include/asm/uaccess.h | 15 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/traps.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/unaligned.c | 4 | ||||
-rw-r--r-- | arch/ia64/mm/fault.c | 2 |
6 files changed, 46 insertions, 20 deletions
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); |