xref: /linux/arch/arm64/mm/extable.c (revision 0edfa8391664a4f795c67d0e07480fbe801a0e1d)
11d18c47cSCatalin Marinas /*
21d18c47cSCatalin Marinas  * Based on arch/arm/mm/extable.c
31d18c47cSCatalin Marinas  */
41d18c47cSCatalin Marinas 
5*0edfa839SPaul Gortmaker #include <linux/extable.h>
61d18c47cSCatalin Marinas #include <linux/uaccess.h>
71d18c47cSCatalin Marinas 
81d18c47cSCatalin Marinas int fixup_exception(struct pt_regs *regs)
91d18c47cSCatalin Marinas {
101d18c47cSCatalin Marinas 	const struct exception_table_entry *fixup;
111d18c47cSCatalin Marinas 
121d18c47cSCatalin Marinas 	fixup = search_exception_tables(instruction_pointer(regs));
131d18c47cSCatalin Marinas 	if (fixup)
146c94f27aSArd Biesheuvel 		regs->pc = (unsigned long)&fixup->fixup + fixup->fixup;
151d18c47cSCatalin Marinas 
161d18c47cSCatalin Marinas 	return fixup != NULL;
171d18c47cSCatalin Marinas }
18