summaryrefslogtreecommitdiff
path: root/arch/xtensa/include/asm/traps.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-11-19 08:30:15 +0400
committerChris Zankel <chris@zankel.net>2012-12-18 21:10:22 -0800
commit28570e8dac5c86ab10ce2a7e9c02d3aaece63760 (patch)
tree29a915825b1851c1377d88bdb008a0eb7993d78f /arch/xtensa/include/asm/traps.h
parentc622b29d1f38021411965b7e0170ab055551b257 (diff)
xtensa: add trap_set_handler function
trap_set_handler sets new C-handler in the exception table and returns previous handler. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/include/asm/traps.h')
-rw-r--r--arch/xtensa/include/asm/traps.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/xtensa/include/asm/traps.h b/arch/xtensa/include/asm/traps.h
new file mode 100644
index 000000000000..54f70440185e
--- /dev/null
+++ b/arch/xtensa/include/asm/traps.h
@@ -0,0 +1,23 @@
+/*
+ * arch/xtensa/include/asm/traps.h
+ *
+ * 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.
+ *
+ * Copyright (C) 2012 Tensilica Inc.
+ */
+#ifndef _XTENSA_TRAPS_H
+#define _XTENSA_TRAPS_H
+
+#include <asm/ptrace.h>
+
+/*
+ * handler must be either of the following:
+ * void (*)(struct pt_regs *regs);
+ * void (*)(struct pt_regs *regs, unsigned long exccause);
+ */
+extern void * __init trap_set_handler(int cause, void *handler);
+extern void do_unhandled(struct pt_regs *regs, unsigned long exccause);
+
+#endif /* _XTENSA_TRAPS_H */