extable.c 585 B

1234567891011121314151617181920212223242526
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
  7. */
  8. #include <linux/extable.h>
  9. #include <linux/spinlock.h>
  10. #include <asm/branch.h>
  11. #include <asm/uaccess.h>
  12. int fixup_exception(struct pt_regs *regs)
  13. {
  14. const struct exception_table_entry *fixup;
  15. fixup = search_exception_tables(exception_epc(regs));
  16. if (fixup) {
  17. regs->cp0_epc = fixup->nextinsn;
  18. return 1;
  19. }
  20. return 0;
  21. }