Commit 5b2ce890 authored by Russell King's avatar Russell King

[ARM] Fix exception table handling

This fixes a build error caused by other changes in 2.5.67.
parent 7d5aa396
/*
* linux/arch/arm/mm/extable.c
*/
#include <linux/config.h>
#include <linux/module.h>
#include <asm/uaccess.h>
const struct exception_table_entry *
......@@ -24,3 +24,14 @@ search_extable(const struct exception_table_entry *first,
}
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;
}
......@@ -25,6 +25,7 @@
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include "fault.h"
......@@ -103,20 +104,11 @@ static void
__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.
......
......@@ -28,8 +28,7 @@ struct exception_table_entry
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment