extable.c 705 B

1234567891011121314151617181920212223242526
  1. /* MN10300 In-kernel exception handling
  2. *
  3. * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
  4. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #include <linux/module.h>
  12. #include <linux/spinlock.h>
  13. #include <asm/uaccess.h>
  14. int fixup_exception(struct pt_regs *regs)
  15. {
  16. const struct exception_table_entry *fixup;
  17. fixup = search_exception_tables(regs->pc);
  18. if (fixup) {
  19. regs->pc = fixup->fixup;
  20. return 1;
  21. }
  22. return 0;
  23. }