diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sparc64/kdebug.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-sparc64/kdebug.h')
-rw-r--r-- | include/asm-sparc64/kdebug.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h new file mode 100644 index 000000000000..f70d3dad01f9 --- /dev/null +++ b/include/asm-sparc64/kdebug.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _SPARC64_KDEBUG_H | ||
2 | #define _SPARC64_KDEBUG_H | ||
3 | |||
4 | /* Nearly identical to x86_64/i386 code. */ | ||
5 | |||
6 | #include <linux/notifier.h> | ||
7 | |||
8 | struct pt_regs; | ||
9 | |||
10 | struct die_args { | ||
11 | struct pt_regs *regs; | ||
12 | const char *str; | ||
13 | long err; | ||
14 | int trapnr; | ||
15 | int signr; | ||
16 | }; | ||
17 | |||
18 | /* Note - you should never unregister because that can race with NMIs. | ||
19 | * If you really want to do it first unregister - then synchronize_kernel | ||
20 | * - then free. | ||
21 | */ | ||
22 | int register_die_notifier(struct notifier_block *nb); | ||
23 | extern struct notifier_block *sparc64die_chain; | ||
24 | |||
25 | extern void bad_trap(struct pt_regs *, long); | ||
26 | |||
27 | /* Grossly misnamed. */ | ||
28 | enum die_val { | ||
29 | DIE_OOPS = 1, | ||
30 | DIE_DEBUG, /* ta 0x70 */ | ||
31 | DIE_DEBUG_2, /* ta 0x71 */ | ||
32 | DIE_DIE, | ||
33 | DIE_TRAP, | ||
34 | DIE_TRAP_TL1, | ||
35 | DIE_GPF, | ||
36 | DIE_CALL, | ||
37 | DIE_PAGE_FAULT, | ||
38 | }; | ||
39 | |||
40 | static inline int notify_die(enum die_val val,char *str, struct pt_regs *regs, | ||
41 | long err, int trap, int sig) | ||
42 | { | ||
43 | struct die_args args = { .regs = regs, | ||
44 | .str = str, | ||
45 | .err = err, | ||
46 | .trapnr = trap, | ||
47 | .signr = sig }; | ||
48 | |||
49 | return notifier_call_chain(&sparc64die_chain, val, &args); | ||
50 | } | ||
51 | |||
52 | #endif | ||