aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nios2/mm/extable.c
diff options
context:
space:
mode:
authorLey Foon Tan <lftan@altera.com>2014-11-06 15:19:44 +0800
committerLey Foon Tan <lftan@altera.com>2014-12-08 12:55:52 +0800
commit862674d4249c204ce58313ec4f59190abbc86b7e (patch)
tree0a36821c0671a2ff6f990c098628149a04cbb9ef /arch/nios2/mm/extable.c
parent6b8baec4d652df19be6e0997c50b9894e5ca30a8 (diff)
nios2: MMU Fault handling
This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch, kernel/entry.S). Signed-off-by: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2/mm/extable.c')
-rw-r--r--arch/nios2/mm/extable.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/nios2/mm/extable.c b/arch/nios2/mm/extable.c
new file mode 100644
index 000000000000..4d2fc5a589d0
--- /dev/null
+++ b/arch/nios2/mm/extable.c
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010, Tobias Klauser <tklauser@distanz.ch>
+ * Copyright (C) 2009, Wind River Systems Inc
+ * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/module.h>
+#include <linux/uaccess.h>
+
+int fixup_exception(struct pt_regs *regs)
+{
+ const struct exception_table_entry *fixup;
+
+ fixup = search_exception_tables(regs->ea);
+ if (fixup) {
+ regs->ea = fixup->fixup;
+ return 1;
+ }
+
+ return 0;
+}

Privacy Policy