extable_32.c 407 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * linux/arch/sh/mm/extable.c
  4. * Taken from:
  5. * linux/arch/i386/mm/extable.c
  6. */
  7. #include <linux/extable.h>
  8. #include <linux/uaccess.h>
  9. #include <asm/ptrace.h>
  10. int fixup_exception(struct pt_regs *regs)
  11. {
  12. const struct exception_table_entry *fixup;
  13. fixup = search_exception_tables(regs->pc);
  14. if (fixup) {
  15. regs->pc = fixup->fixup;
  16. return 1;
  17. }
  18. return 0;
  19. }