1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun // Copyright (C) 2005-2017 Andes Technology Corporation 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun #include <linux/extable.h> 5*4882a593Smuzhiyun #include <linux/uaccess.h> 6*4882a593Smuzhiyun fixup_exception(struct pt_regs * regs)7*4882a593Smuzhiyunint fixup_exception(struct pt_regs *regs) 8*4882a593Smuzhiyun { 9*4882a593Smuzhiyun const struct exception_table_entry *fixup; 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun fixup = search_exception_tables(instruction_pointer(regs)); 12*4882a593Smuzhiyun if (fixup) 13*4882a593Smuzhiyun regs->ipc = fixup->fixup; 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun return fixup != NULL; 16*4882a593Smuzhiyun } 17