summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/kdebug.h
diff options
context:
space:
mode:
authorDmitry Torokhov2007-05-08 07:31:11 +0200
committerDmitry Torokhov2007-05-08 07:31:11 +0200
commit334d0dd8b660557608142f0f77abc6812b48f08b (patch)
tree9393a9aa099d7d42deda5f9f5054796c0c769be7 /include/asm-sh/kdebug.h
parentInput: aaed2000_kbd - convert to use polldev library (diff)
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff)
downloadkernel-qcow2-linux-334d0dd8b660557608142f0f77abc6812b48f08b.tar.gz
kernel-qcow2-linux-334d0dd8b660557608142f0f77abc6812b48f08b.tar.xz
kernel-qcow2-linux-334d0dd8b660557608142f0f77abc6812b48f08b.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-sh/kdebug.h')
-rw-r--r--include/asm-sh/kdebug.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/asm-sh/kdebug.h b/include/asm-sh/kdebug.h
new file mode 100644
index 000000000000..ef009baf5a11
--- /dev/null
+++ b/include/asm-sh/kdebug.h
@@ -0,0 +1,35 @@
+#ifndef __ASM_SH_KDEBUG_H
+#define __ASM_SH_KDEBUG_H
+
+#include <linux/notifier.h>
+
+struct pt_regs;
+
+struct die_args {
+ struct pt_regs *regs;
+ int trapnr;
+};
+
+int register_die_notifier(struct notifier_block *nb);
+int unregister_die_notifier(struct notifier_block *nb);
+int register_page_fault_notifier(struct notifier_block *nb);
+int unregister_page_fault_notifier(struct notifier_block *nb);
+extern struct atomic_notifier_head shdie_chain;
+
+/* Grossly misnamed. */
+enum die_val {
+ DIE_TRAP,
+ DIE_PAGE_FAULT,
+};
+
+static inline int notify_die(enum die_val val, struct pt_regs *regs,
+ int trap, int sig)
+{
+ struct die_args args = {
+ .regs = regs,
+ .trapnr = trap,
+ };
+
+ return atomic_notifier_call_chain(&shdie_chain, val, &args);
+}
+#endif /* __ASM_SH_KDEBUG_H */