| Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
| GuanXuetao | 56372b0 | 2011-01-15 18:17:56 +0800 | [diff] [blame] | 2 | /* |
| 3 | * linux/arch/unicore32/mm/extable.c |
| 4 | * |
| 5 | * Code specific to PKUnity SoC and UniCore ISA |
| 6 | * |
| 7 | * Copyright (C) 2001-2010 GUAN Xue-tao |
| GuanXuetao | 56372b0 | 2011-01-15 18:17:56 +0800 | [diff] [blame] | 8 | */ |
| Paul Gortmaker | 0f91f3f | 2017-01-10 14:13:29 -0500 | [diff] [blame] | 9 | #include <linux/extable.h> |
| GuanXuetao | 56372b0 | 2011-01-15 18:17:56 +0800 | [diff] [blame] | 10 | #include <linux/uaccess.h> |
| 11 | |
| 12 | int fixup_exception(struct pt_regs *regs) |
| 13 | { |
| 14 | const struct exception_table_entry *fixup; |
| 15 | |
| 16 | fixup = search_exception_tables(instruction_pointer(regs)); |
| 17 | if (fixup) |
| 18 | regs->UCreg_pc = fixup->fixup; |
| 19 | |
| 20 | return fixup != NULL; |
| 21 | } |