/*
* linux/arch/arm/mm/extable.c
*/
-#include <linux/config.h>
+#include <linux/module.h>
#include <asm/uaccess.h>
const struct exception_table_entry *
}
return NULL;
}
+
+int fixup_exception(struct pt_regs *regs)
+{
+ const struct exception_table_entry *fixup;
+
+ fixup = search_exception_tables(instruction_pointer(regs));
+ if (fixup)
+ regs->ARM_pc = fixup->fixup;
+
+ return fixup != NULL;
+}
#include <asm/system.h>
#include <asm/pgtable.h>
+#include <asm/uaccess.h>
#include "fault.h"
__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
- const struct exception_table_entry *fixup;
-
/*
* Are we prepared to handle this kernel fault?
*/
- fixup = search_exception_tables(instruction_pointer(regs));
- if (fixup) {
-#ifdef DEBUG
- printk(KERN_DEBUG "%s: Exception at [<%lx>] addr=%lx (fixup: %lx)\n",
- current->comm, regs->ARM_pc, addr, fixup->fixup);
-#endif
- regs->ARM_pc = fixup->fixup;
+ if (fixup_exception(regs))
return;
- }
/*
* No handler, we'll have to terminate things with extreme prejudice.
unsigned long insn, fixup;
};
-/* Returns 0 if exception not found and fixup otherwise. */
-extern unsigned long search_exception_table(unsigned long);
+extern int fixup_exception(struct pt_regs *regs);
#define get_ds() (KERNEL_DS)
#define get_fs() (current_thread_info()->addr_limit)