Skip to contentSkip to conversation

Subject: [PATCH 32/33] score: create mm/ files extable.c fault.c

PATCH Chen Liqin 1 participant 1 message Aug 26, 2009 Generic include/asm header files

lore
Share & tools
lore

Chen Liqin

author
#0 lore raw

From 9a983ba502045e6ed9ac8055f10717df9db100cb Mon Sep 17 00:00:00 2001
From: Chen Liqin <[email protected]>
Date: Wed, 26 Aug 2009 10:05:12 +0800
Subject: [PATCH 32/33] score: create mm/ files extable.c fault.c

---
 arch/score/mm/extable.c |   38 ++++++++
 arch/score/mm/fault.c   |  235 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 273 insertions(+), 0 deletions(-)
 create mode 100644 arch/score/mm/extable.c
 create mode 100644 arch/score/mm/fault.c
arch/score/mm/extable.c new file +38 -0
new file mode 100644
index 0000000..01ff644
@@ -0,0 +1,38 @@
+/*
+ * arch/score/mm/extable.c
+ *
+ * Score Processor version.
+ *
+ * Copyright (C) 2009 Sunplus Core Technology Co., Ltd.
+ *  Lennox Wu <[email protected]>
+ *  Chen Liqin <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see the file COPYING, or write
+ * to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/module.h>
+
+int fixup_exception(struct pt_regs *regs)
+{
+	const struct exception_table_entry *fixup;
+
+	fixup = search_exception_tables(regs->cp0_epc);
+	if (fixup) {
+		regs->cp0_epc = fixup->fixup;
+		return 1;
+	}
+	return 0;
+}
arch/score/mm/fault.c new file +235 -0

235 lines not on this page · raw message

Signature · 1 line
1.6.2