1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright (C) 2010, Tobias Klauser <tklauser@distanz.ch> 3*4882a593Smuzhiyun * Copyright (C) 2009, Wind River Systems Inc 4*4882a593Smuzhiyun * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General Public 7*4882a593Smuzhiyun * License. See the file "COPYING" in the main directory of this archive 8*4882a593Smuzhiyun * for more details. 9*4882a593Smuzhiyun */ 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #include <linux/extable.h> 12*4882a593Smuzhiyun #include <linux/uaccess.h> 13*4882a593Smuzhiyun fixup_exception(struct pt_regs * regs)14*4882a593Smuzhiyunint fixup_exception(struct pt_regs *regs) 15*4882a593Smuzhiyun { 16*4882a593Smuzhiyun const struct exception_table_entry *fixup; 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun fixup = search_exception_tables(regs->ea); 19*4882a593Smuzhiyun if (fixup) { 20*4882a593Smuzhiyun regs->ea = fixup->fixup; 21*4882a593Smuzhiyun return 1; 22*4882a593Smuzhiyun } 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun return 0; 25*4882a593Smuzhiyun } 26