blob: 81bc8a34a83facfae6adda86293e51a60923a1b7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Ralf Baechle49316cbf02009-07-06 09:13:17 +01002 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 */
Paul Gortmaker9f3b8082016-08-15 19:11:52 -04008#include <linux/extable.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <linux/spinlock.h>
10#include <asm/branch.h>
Linus Torvalds7c0f6ba2016-12-24 11:46:01 -080011#include <linux/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
13int fixup_exception(struct pt_regs *regs)
14{
15 const struct exception_table_entry *fixup;
16
17 fixup = search_exception_tables(exception_epc(regs));
18 if (fixup) {
19 regs->cp0_epc = fixup->nextinsn;
20
21 return 1;
22 }
23
24 return 0;
25}