extable.c 623 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (C) 2010, Tobias Klauser <tklauser@distanz.ch>
  3. * Copyright (C) 2009, Wind River Systems Inc
  4. * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/module.h>
  11. #include <linux/uaccess.h>
  12. int fixup_exception(struct pt_regs *regs)
  13. {
  14. const struct exception_table_entry *fixup;
  15. fixup = search_exception_tables(regs->ea);
  16. if (fixup) {
  17. regs->ea = fixup->fixup;
  18. return 1;
  19. }
  20. return 0;
  21. }