1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General Public 3*4882a593Smuzhiyun * License. See the file "COPYING" in the main directory of this archive 4*4882a593Smuzhiyun * for more details. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org> 7*4882a593Smuzhiyun */ 8*4882a593Smuzhiyun #include <linux/extable.h> 9*4882a593Smuzhiyun #include <linux/spinlock.h> 10*4882a593Smuzhiyun #include <asm/branch.h> 11*4882a593Smuzhiyun #include <linux/uaccess.h> 12*4882a593Smuzhiyun fixup_exception(struct pt_regs * regs)13*4882a593Smuzhiyunint fixup_exception(struct pt_regs *regs) 14*4882a593Smuzhiyun { 15*4882a593Smuzhiyun const struct exception_table_entry *fixup; 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun fixup = search_exception_tables(exception_epc(regs)); 18*4882a593Smuzhiyun if (fixup) { 19*4882a593Smuzhiyun regs->cp0_epc = fixup->nextinsn; 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun return 1; 22*4882a593Smuzhiyun } 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun return 0; 25*4882a593Smuzhiyun } 26