blob: 14312027bb0806cceb84ef5adc532f4666a8f504 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 * linux/arch/sh/mm/extable.c
4 * Taken from:
5 * linux/arch/i386/mm/extable.c
6 */
7
Paul Gortmakerd92280d2016-07-23 14:01:45 -04008#include <linux/extable.h>
Linus Torvalds7c0f6ba2016-12-24 11:46:01 -08009#include <linux/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
Ingo Molnarf780d892017-02-03 10:03:42 +010011#include <asm/ptrace.h>
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013int fixup_exception(struct pt_regs *regs)
14{
15 const struct exception_table_entry *fixup;
16
17 fixup = search_exception_tables(regs->pc);
18 if (fixup) {
19 regs->pc = fixup->fixup;
20 return 1;
21 }
22
23 return 0;
24}