| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | // Copyright (C) 2005-2017 Andes Technology Corporation | ||||
| 3 | |||||
| 4 | #include <linux/extable.h> | ||||
| 5 | #include <linux/uaccess.h> | ||||
| 6 | |||||
| 7 | int fixup_exception(struct pt_regs *regs) | ||||
| 8 | { | ||||
| 9 | const struct exception_table_entry *fixup; | ||||
| 10 | |||||
| 11 | fixup = search_exception_tables(instruction_pointer(regs)); | ||||
| 12 | if (fixup) | ||||
| 13 | regs->ipc = fixup->fixup; | ||||
| 14 | |||||
| 15 | return fixup != NULL; | ||||
| 16 | } | ||||