aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/kdebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/kdebug.h')
-rw-r--r--include/asm-ppc64/kdebug.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/asm-ppc64/kdebug.h b/include/asm-ppc64/kdebug.h
new file mode 100644
index 000000000000..488634258a72
--- /dev/null
+++ b/include/asm-ppc64/kdebug.h
@@ -0,0 +1,43 @@
1#ifndef _PPC64_KDEBUG_H
2#define _PPC64_KDEBUG_H 1
3
4/* nearly identical to x86_64/i386 code */
5
6#include <linux/notifier.h>
7
8struct pt_regs;
9
10struct die_args {
11 struct pt_regs *regs;
12 const char *str;
13 long err;
14 int trapnr;
15 int signr;
16};
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_kernel -
21 then free.
22 */
23int register_die_notifier(struct notifier_block *nb);
24extern struct notifier_block *ppc64_die_chain;
25
26/* Grossly misnamed. */
27enum die_val {
28 DIE_OOPS = 1,
29 DIE_IABR_MATCH,
30 DIE_DABR_MATCH,
31 DIE_BPT,
32 DIE_SSTEP,
33 DIE_GPF,
34 DIE_PAGE_FAULT,
35};
36
37static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig)
38{
39 struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig };
40 return notifier_call_chain(&ppc64_die_chain, val, &args);
41}
42
43#endif