1*b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0 283ce3ac1SPaul Mundt /* 383ce3ac1SPaul Mundt * linux/arch/sh/mm/extable.c 483ce3ac1SPaul Mundt * Taken from: 583ce3ac1SPaul Mundt * linux/arch/i386/mm/extable.c 683ce3ac1SPaul Mundt */ 783ce3ac1SPaul Mundt 8d92280d1SPaul Gortmaker #include <linux/extable.h> 97c0f6ba6SLinus Torvalds #include <linux/uaccess.h> 1083ce3ac1SPaul Mundt 11f780d89aSIngo Molnar #include <asm/ptrace.h> 12f780d89aSIngo Molnar fixup_exception(struct pt_regs * regs)1383ce3ac1SPaul Mundtint fixup_exception(struct pt_regs *regs) 1483ce3ac1SPaul Mundt { 1583ce3ac1SPaul Mundt const struct exception_table_entry *fixup; 1683ce3ac1SPaul Mundt 1783ce3ac1SPaul Mundt fixup = search_exception_tables(regs->pc); 1883ce3ac1SPaul Mundt if (fixup) { 1983ce3ac1SPaul Mundt regs->pc = fixup->fixup; 2083ce3ac1SPaul Mundt return 1; 2183ce3ac1SPaul Mundt } 2283ce3ac1SPaul Mundt 2383ce3ac1SPaul Mundt return 0; 2483ce3ac1SPaul Mundt } 25