| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  *  linux/arch/arm26/mm/extable.c | 
 | 3 |  */ | 
 | 4 |  | 
 | 5 | #include <linux/config.h> | 
 | 6 | #include <linux/module.h> | 
 | 7 | #include <asm/uaccess.h> | 
 | 8 |  | 
 | 9 | int fixup_exception(struct pt_regs *regs) | 
 | 10 | { | 
 | 11 |         const struct exception_table_entry *fixup; | 
 | 12 |  | 
 | 13 |         fixup = search_exception_tables(instruction_pointer(regs)); | 
 | 14 |  | 
 | 15 | 	/* | 
 | 16 | 	 * The kernel runs in SVC mode - make sure we keep running in SVC mode | 
 | 17 | 	 * by frobbing the PSR appropriately (PSR and PC are in the same reg. | 
 | 18 | 	 * on ARM26) | 
 | 19 | 	 */ | 
 | 20 |         if (fixup) | 
 | 21 |                 regs->ARM_pc = fixup->fixup | PSR_I_BIT | MODE_SVC26; | 
 | 22 |  | 
 | 23 |         return fixup != NULL; | 
 | 24 | } | 
 | 25 |  |