extable.c 452 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3
/*
 *  linux/arch/arm/mm/extable.c
 */
4
#include <linux/extable.h>
5
#include <linux/uaccess.h>
L
Linus Torvalds 已提交
6 7 8 9 10 11

int fixup_exception(struct pt_regs *regs)
{
	const struct exception_table_entry *fixup;

	fixup = search_exception_tables(instruction_pointer(regs));
12
	if (fixup) {
L
Linus Torvalds 已提交
13
		regs->ARM_pc = fixup->fixup;
14 15 16 17 18
#ifdef CONFIG_THUMB2_KERNEL
		/* Clear the IT state to avoid nasty surprises in the fixup */
		regs->ARM_cpsr &= ~PSR_IT_MASK;
#endif
	}
L
Linus Torvalds 已提交
19 20 21

	return fixup != NULL;
}