1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 4 * 5 * Borrowed heavily from MIPS 6 */ 7 8#include <linux/export.h> 9#include <linux/extable.h> 10#include <linux/uaccess.h> 11 12int 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->ret = fixup->fixup; 19 20 return 1; 21 } 22 23 return 0; 24} 25