extable.c 451 B

12345678910111213141516171819202122
  1. /*
  2. * linux/arch/arm/mm/extable.c
  3. */
  4. #include <linux/module.h>
  5. #include <linux/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. if (fixup) {
  11. regs->ARM_pc = fixup->fixup;
  12. #ifdef CONFIG_THUMB2_KERNEL
  13. /* Clear the IT state to avoid nasty surprises in the fixup */
  14. regs->ARM_cpsr &= ~PSR_IT_MASK;
  15. #endif
  16. }
  17. return fixup != NULL;
  18. }