Catalin Marinas | 1d18c47 | 2012-03-05 11:49:27 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Based on arch/arm/mm/extable.c |
| 3 | */ |
| 4 | |
Paul Gortmaker | 0edfa83 | 2016-09-19 17:38:55 -0400 | [diff] [blame] | 5 | #include <linux/extable.h> |
Catalin Marinas | 1d18c47 | 2012-03-05 11:49:27 +0000 | [diff] [blame] | 6 | #include <linux/uaccess.h> |
| 7 | |
| 8 | int fixup_exception(struct pt_regs *regs) |
| 9 | { |
| 10 | const struct exception_table_entry *fixup; |
| 11 | |
| 12 | fixup = search_exception_tables(instruction_pointer(regs)); |
| 13 | if (fixup) |
Ard Biesheuvel | 6c94f27 | 2016-01-01 15:02:12 +0100 | [diff] [blame] | 14 | regs->pc = (unsigned long)&fixup->fixup + fixup->fixup; |
Catalin Marinas | 1d18c47 | 2012-03-05 11:49:27 +0000 | [diff] [blame] | 15 | |
| 16 | return fixup != NULL; |
| 17 | } |