]> git.hungrycats.org Git - linux/commitdiff
[ARM] Fix exception table handling
authorRussell King <rmk@flint.arm.linux.org.uk>
Sun, 13 Apr 2003 01:01:27 +0000 (02:01 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sun, 13 Apr 2003 01:01:27 +0000 (02:01 +0100)
This fixes a build error caused by other changes in 2.5.67.

arch/arm/mm/extable.c
arch/arm/mm/fault-common.c
include/asm-arm/uaccess.h

index 4698233b97431d2a210366786f87d0e75f65194e..8c4840f5b4a3e8e2af12be906f38b6502c4c5e9d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  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;
+}
index 5b807b9ef49a419daafd945b85359cfabf55faab..3193a6e9b8c058f21e6758bdab36a3c8762bb076 100644 (file)
@@ -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.
index 0534487d8ff3360f94ff3e99b682b0245fe65d88..a5281acd7fb1dec049d24f40d78219cf0ecb3f82 100644 (file)
@@ -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)