diff options
author | Michael Grundy <grundym@us.ibm.com> | 2006-09-20 09:58:39 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 09:58:39 -0400 |
commit | 4ba069b802c29eee066385f9826e2d83716626b4 (patch) | |
tree | 663159a4d05a49b4133bb9145fc41fb95a6d4132 /include/asm-s390/kdebug.h | |
parent | 5432114baf0300286a6ca1b0aea549492a379432 (diff) |
[S390] add kprobes support.
Signed-off-by: Michael Grundy <grundym@us.ibm.com>
Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/kdebug.h')
-rw-r--r-- | include/asm-s390/kdebug.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/include/asm-s390/kdebug.h b/include/asm-s390/kdebug.h new file mode 100644 index 000000000000..40cc68025e01 --- /dev/null +++ b/include/asm-s390/kdebug.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef _S390_KDEBUG_H | ||
2 | #define _S390_KDEBUG_H | ||
3 | |||
4 | /* | ||
5 | * Feb 2006 Ported to s390 <grundym@us.ibm.com> | ||
6 | */ | ||
7 | #include <linux/notifier.h> | ||
8 | |||
9 | struct pt_regs; | ||
10 | |||
11 | struct die_args { | ||
12 | struct pt_regs *regs; | ||
13 | const char *str; | ||
14 | long err; | ||
15 | int trapnr; | ||
16 | int signr; | ||
17 | }; | ||
18 | |||
19 | /* Note - you should never unregister because that can race with NMIs. | ||
20 | * If you really want to do it first unregister - then synchronize_sched | ||
21 | * - then free. | ||
22 | */ | ||
23 | extern int register_die_notifier(struct notifier_block *); | ||
24 | extern int unregister_die_notifier(struct notifier_block *); | ||
25 | extern int register_page_fault_notifier(struct notifier_block *); | ||
26 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
27 | extern struct atomic_notifier_head s390die_chain; | ||
28 | |||
29 | |||
30 | enum die_val { | ||
31 | DIE_OOPS = 1, | ||
32 | DIE_BPT, | ||
33 | DIE_SSTEP, | ||
34 | DIE_PANIC, | ||
35 | DIE_NMI, | ||
36 | DIE_DIE, | ||
37 | DIE_NMIWATCHDOG, | ||
38 | DIE_KERNELDEBUG, | ||
39 | DIE_TRAP, | ||
40 | DIE_GPF, | ||
41 | DIE_CALL, | ||
42 | DIE_NMI_IPI, | ||
43 | DIE_PAGE_FAULT, | ||
44 | }; | ||
45 | |||
46 | static inline int notify_die(enum die_val val, const char *str, | ||
47 | struct pt_regs *regs, long err, int trap, int sig) | ||
48 | { | ||
49 | struct die_args args = { | ||
50 | .regs = regs, | ||
51 | .str = str, | ||
52 | .err = err, | ||
53 | .trapnr = trap, | ||
54 | .signr = sig | ||
55 | }; | ||
56 | return atomic_notifier_call_chain(&s390die_chain, val, &args); | ||
57 | } | ||
58 | |||
59 | #endif | ||