diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-01 03:33:10 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-06 22:11:57 -0400 |
commit | 3a2e117e220f000f95187ea1e1bbe83b0ed5fdfb (patch) | |
tree | 57fab5755138283793647b5d0d2a2c872f00a430 /arch/sh/kernel/traps.c | |
parent | 3dde7a3c74bcc25c6fc31b836fec8c91fb0b2b8f (diff) |
sh: Add die chain notifiers.
Add the atomic die chains in, kprobes needs these.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/traps.c')
-rw-r--r-- | arch/sh/kernel/traps.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index 77107838271f..7b40f0ff3dfc 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * SuperH version: Copyright (C) 1999 Niibe Yutaka | 5 | * SuperH version: Copyright (C) 1999 Niibe Yutaka |
6 | * Copyright (C) 2000 Philipp Rumpf | 6 | * Copyright (C) 2000 Philipp Rumpf |
7 | * Copyright (C) 2000 David Howells | 7 | * Copyright (C) 2000 David Howells |
8 | * Copyright (C) 2002 - 2006 Paul Mundt | 8 | * Copyright (C) 2002 - 2007 Paul Mundt |
9 | * | 9 | * |
10 | * This file is subject to the terms and conditions of the GNU General Public | 10 | * This file is subject to the terms and conditions of the GNU General Public |
11 | * License. See the file "COPYING" in the main directory of this archive | 11 | * License. See the file "COPYING" in the main directory of this archive |
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/limits.h> | 23 | #include <linux/limits.h> |
24 | #include <asm/system.h> | 24 | #include <asm/system.h> |
25 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <asm/kdebug.h> | ||
26 | 27 | ||
27 | #ifdef CONFIG_SH_KGDB | 28 | #ifdef CONFIG_SH_KGDB |
28 | #include <asm/kgdb.h> | 29 | #include <asm/kgdb.h> |
@@ -75,7 +76,21 @@ static void dump_mem(const char *str, unsigned long bottom, unsigned long top) | |||
75 | } | 76 | } |
76 | } | 77 | } |
77 | 78 | ||
78 | DEFINE_SPINLOCK(die_lock); | 79 | ATOMIC_NOTIFIER_HEAD(shdie_chain); |
80 | |||
81 | int register_die_notifier(struct notifier_block *nb) | ||
82 | { | ||
83 | return atomic_notifier_chain_register(&shdie_chain, nb); | ||
84 | } | ||
85 | EXPORT_SYMBOL(register_die_notifier); | ||
86 | |||
87 | int unregister_die_notifier(struct notifier_block *nb) | ||
88 | { | ||
89 | return atomic_notifier_chain_unregister(&shdie_chain, nb); | ||
90 | } | ||
91 | EXPORT_SYMBOL(unregister_die_notifier); | ||
92 | |||
93 | static DEFINE_SPINLOCK(die_lock); | ||
79 | 94 | ||
80 | void die(const char * str, struct pt_regs * regs, long err) | 95 | void die(const char * str, struct pt_regs * regs, long err) |
81 | { | 96 | { |