David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 1 | /* MN10300 In-kernel exception handling |
| 2 | * |
| 3 | * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd. |
| 4 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public Licence |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ |
Paul Gortmaker | 8ac449e | 2016-07-23 14:01:45 -0400 | [diff] [blame] | 11 | #include <linux/extable.h> |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 12 | #include <linux/spinlock.h> |
Linus Torvalds | 7c0f6ba | 2016-12-24 11:46:01 -0800 | [diff] [blame] | 13 | #include <linux/uaccess.h> |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 14 | |
| 15 | int fixup_exception(struct pt_regs *regs) |
| 16 | { |
| 17 | const struct exception_table_entry *fixup; |
| 18 | |
| 19 | fixup = search_exception_tables(regs->pc); |
| 20 | if (fixup) { |
| 21 | regs->pc = fixup->fixup; |
| 22 | return 1; |
| 23 | } |
| 24 | |
| 25 | return 0; |
| 26 | } |