extable.c 548 B

123456789101112131415161718192021222324
  1. /*
  2. * linux/arch/arm26/mm/extable.c
  3. */
  4. #include <linux/module.h>
  5. #include <asm/uaccess.h>
  6. int fixup_exception(struct pt_regs *regs)
  7. {
  8. const struct exception_table_entry *fixup;
  9. fixup = search_exception_tables(instruction_pointer(regs));
  10. /*
  11. * The kernel runs in SVC mode - make sure we keep running in SVC mode
  12. * by frobbing the PSR appropriately (PSR and PC are in the same reg.
  13. * on ARM26)
  14. */
  15. if (fixup)
  16. regs->ARM_pc = fixup->fixup | PSR_I_BIT | MODE_SVC26;
  17. return fixup != NULL;
  18. }