blob: 940e871bc8169cba5e119d86579078f4e3ec6294 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/sh/mm/extable.c
3 * Taken from:
4 * linux/arch/i386/mm/extable.c
5 */
6
Paul Gortmakerd92280d2016-07-23 14:01:45 -04007#include <linux/extable.h>
Linus Torvalds7c0f6ba2016-12-24 11:46:01 -08008#include <linux/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Ingo Molnarf780d892017-02-03 10:03:42 +010010#include <asm/ptrace.h>
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012int fixup_exception(struct pt_regs *regs)
13{
14 const struct exception_table_entry *fixup;
15
16 fixup = search_exception_tables(regs->pc);
17 if (fixup) {
18 regs->pc = fixup->fixup;
19 return 1;
20 }
21
22 return 0;
23}