]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/arm/mm/extable.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / arm / mm / extable.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
1da177e4
LT
2/*
3 * linux/arch/arm/mm/extable.c
4 */
0ea9365a 5#include <linux/extable.h>
33fa9b13 6#include <linux/uaccess.h>
1da177e4
LT
7
8int fixup_exception(struct pt_regs *regs)
9{
10 const struct exception_table_entry *fixup;
11
12 fixup = search_exception_tables(instruction_pointer(regs));
e16b31bf 13 if (fixup) {
1da177e4 14 regs->ARM_pc = fixup->fixup;
e16b31bf
MZ
15#ifdef CONFIG_THUMB2_KERNEL
16 /* Clear the IT state to avoid nasty surprises in the fixup */
17 regs->ARM_cpsr &= ~PSR_IT_MASK;
18#endif
19 }
1da177e4
LT
20
21 return fixup != NULL;
22}