extable.c 574 B

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