summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/extable.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/extable.c')
-rw-r--r--arch/mips/mm/extable.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/mm/extable.c b/arch/mips/mm/extable.c
new file mode 100644
index 00000000000..297fb9f390d
--- /dev/null
+++ b/arch/mips/mm/extable.c
@@ -0,0 +1,21 @@
+/*
+ * linux/arch/mips/mm/extable.c
+ */
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/branch.h>
+#include <asm/uaccess.h>
+
+int fixup_exception(struct pt_regs *regs)
+{
+ const struct exception_table_entry *fixup;
+
+ fixup = search_exception_tables(exception_epc(regs));
+ if (fixup) {
+ regs->cp0_epc = fixup->nextinsn;
+
+ return 1;
+ }
+
+ return 0;
+}