Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/sh/mm/extable.c |
| 3 | * Taken from: |
| 4 | * linux/arch/i386/mm/extable.c |
| 5 | */ |
| 6 | |
Paul Gortmaker | d92280d | 2016-07-23 14:01:45 -0400 | [diff] [blame] | 7 | #include <linux/extable.h> |
Linus Torvalds | 7c0f6ba | 2016-12-24 11:46:01 -0800 | [diff] [blame] | 8 | #include <linux/uaccess.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Ingo Molnar | f780d89 | 2017-02-03 10:03:42 +0100 | [diff] [blame] | 10 | #include <asm/ptrace.h> |
| 11 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | int fixup_exception(struct pt_regs *regs) |
| 13 | { |
| 14 | const struct exception_table_entry *fixup; |
| 15 | |
| 16 | fixup = search_exception_tables(regs->pc); |
| 17 | if (fixup) { |
| 18 | regs->pc = fixup->fixup; |
| 19 | return 1; |
| 20 | } |
| 21 | |
| 22 | return 0; |
| 23 | } |