Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  *  linux/arch/arm/mm/extable.c
0004  */
0005 #include <linux/extable.h>
0006 #include <linux/uaccess.h>
0007 
0008 int fixup_exception(struct pt_regs *regs)
0009 {
0010     const struct exception_table_entry *fixup;
0011 
0012     fixup = search_exception_tables(instruction_pointer(regs));
0013     if (fixup) {
0014         regs->ARM_pc = fixup->fixup;
0015 #ifdef CONFIG_THUMB2_KERNEL
0016         /* Clear the IT state to avoid nasty surprises in the fixup */
0017         regs->ARM_cpsr &= ~PSR_IT_MASK;
0018 #endif
0019     }
0020 
0021     return fixup != NULL;
0022 }