diff options
author | Christoph Hellwig <hch@lst.de> | 2007-05-08 03:27:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:04 -0400 |
commit | 1eeb66a1bb973534dc3d064920a5ca683823372e (patch) | |
tree | 19c22d611e6adefb352dbc107b859e4d13ba38c1 /include | |
parent | e3869792990f708c97be5877499cada70d469bd3 (diff) |
move die notifier handling to common code
This patch moves the die notifier handling to common code. Previous
various architectures had exactly the same code for it. Note that the new
code is compiled unconditionally, this should be understood as an appel to
the other architecture maintainer to implement support for it aswell (aka
sprinkling a notify_die or two in the proper place)
arm had a notifiy_die that did something totally different, I renamed it to
arm_notify_die as part of the patch and made it static to the file it's
declared and used at. avr32 used to pass slightly less information through
this interface and I brought it into line with the other architectures.
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
[bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: <linux-arch@vger.kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
31 files changed, 53 insertions, 173 deletions
diff --git a/include/asm-alpha/kdebug.h b/include/asm-alpha/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-alpha/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-arm/kdebug.h b/include/asm-arm/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-arm/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 63b3080bda..25f84da4a9 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -93,7 +93,7 @@ void die(const char *msg, struct pt_regs *regs, int err) | |||
93 | __attribute__((noreturn)); | 93 | __attribute__((noreturn)); |
94 | 94 | ||
95 | struct siginfo; | 95 | struct siginfo; |
96 | void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, | 96 | void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, |
97 | unsigned long err, unsigned long trap); | 97 | unsigned long err, unsigned long trap); |
98 | 98 | ||
99 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | 99 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, |
diff --git a/include/asm-arm26/kdebug.h b/include/asm-arm26/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-arm26/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-avr32/kdebug.h b/include/asm-avr32/kdebug.h index f583b643ff..de419278fc 100644 --- a/include/asm-avr32/kdebug.h +++ b/include/asm-avr32/kdebug.h | |||
@@ -3,19 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/notifier.h> | 4 | #include <linux/notifier.h> |
5 | 5 | ||
6 | struct pt_regs; | ||
7 | |||
8 | struct die_args { | ||
9 | struct pt_regs *regs; | ||
10 | int trapnr; | ||
11 | }; | ||
12 | |||
13 | int register_die_notifier(struct notifier_block *nb); | ||
14 | int unregister_die_notifier(struct notifier_block *nb); | ||
15 | int register_page_fault_notifier(struct notifier_block *nb); | ||
16 | int unregister_page_fault_notifier(struct notifier_block *nb); | ||
17 | extern struct atomic_notifier_head avr32_die_chain; | ||
18 | |||
19 | /* Grossly misnamed. */ | 6 | /* Grossly misnamed. */ |
20 | enum die_val { | 7 | enum die_val { |
21 | DIE_FAULT, | 8 | DIE_FAULT, |
@@ -24,15 +11,7 @@ enum die_val { | |||
24 | DIE_PAGE_FAULT, | 11 | DIE_PAGE_FAULT, |
25 | }; | 12 | }; |
26 | 13 | ||
27 | static inline int notify_die(enum die_val val, struct pt_regs *regs, | 14 | int register_page_fault_notifier(struct notifier_block *nb); |
28 | int trap, int sig) | 15 | int unregister_page_fault_notifier(struct notifier_block *nb); |
29 | { | ||
30 | struct die_args args = { | ||
31 | .regs = regs, | ||
32 | .trapnr = trap, | ||
33 | }; | ||
34 | |||
35 | return atomic_notifier_call_chain(&avr32_die_chain, val, &args); | ||
36 | } | ||
37 | 16 | ||
38 | #endif /* __ASM_AVR32_KDEBUG_H */ | 17 | #endif /* __ASM_AVR32_KDEBUG_H */ |
diff --git a/include/asm-cris/kdebug.h b/include/asm-cris/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-cris/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-frv/kdebug.h b/include/asm-frv/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-frv/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-generic/kdebug.h b/include/asm-generic/kdebug.h new file mode 100644 index 0000000000..2b799c90b2 --- /dev/null +++ b/include/asm-generic/kdebug.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _ASM_GENERIC_KDEBUG_H | ||
2 | #define _ASM_GENERIC_KDEBUG_H | ||
3 | |||
4 | enum die_val { | ||
5 | DIE_UNUSED, | ||
6 | }; | ||
7 | |||
8 | #endif /* _ASM_GENERIC_KDEBUG_H */ | ||
diff --git a/include/asm-h8300/kdebug.h b/include/asm-h8300/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-h8300/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index 6e1c8e1b5e..05c3117788 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h | |||
@@ -9,19 +9,8 @@ | |||
9 | 9 | ||
10 | struct pt_regs; | 10 | struct pt_regs; |
11 | 11 | ||
12 | struct die_args { | ||
13 | struct pt_regs *regs; | ||
14 | const char *str; | ||
15 | long err; | ||
16 | int trapnr; | ||
17 | int signr; | ||
18 | }; | ||
19 | |||
20 | extern int register_die_notifier(struct notifier_block *); | ||
21 | extern int unregister_die_notifier(struct notifier_block *); | ||
22 | extern int register_page_fault_notifier(struct notifier_block *); | 12 | extern int register_page_fault_notifier(struct notifier_block *); |
23 | extern int unregister_page_fault_notifier(struct notifier_block *); | 13 | extern int unregister_page_fault_notifier(struct notifier_block *); |
24 | extern struct atomic_notifier_head i386die_chain; | ||
25 | 14 | ||
26 | 15 | ||
27 | /* Grossly misnamed. */ | 16 | /* Grossly misnamed. */ |
@@ -42,17 +31,4 @@ enum die_val { | |||
42 | DIE_PAGE_FAULT, | 31 | DIE_PAGE_FAULT, |
43 | }; | 32 | }; |
44 | 33 | ||
45 | static inline int notify_die(enum die_val val, const char *str, | ||
46 | struct pt_regs *regs, long err, int trap, int sig) | ||
47 | { | ||
48 | struct die_args args = { | ||
49 | .regs = regs, | ||
50 | .str = str, | ||
51 | .err = err, | ||
52 | .trapnr = trap, | ||
53 | .signr = sig | ||
54 | }; | ||
55 | return atomic_notifier_call_chain(&i386die_chain, val, &args); | ||
56 | } | ||
57 | |||
58 | #endif | 34 | #endif |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index e16359f81a..61fbf8578f 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -243,8 +243,6 @@ static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; re | |||
243 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 243 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
244 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return pte; } | 244 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return pte; } |
245 | 245 | ||
246 | extern void vmalloc_sync_all(void); | ||
247 | |||
248 | #ifdef CONFIG_X86_PAE | 246 | #ifdef CONFIG_X86_PAE |
249 | # include <asm/pgtable-3level.h> | 247 | # include <asm/pgtable-3level.h> |
250 | #else | 248 | #else |
diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h index aed7142f9e..ba211e011a 100644 --- a/include/asm-ia64/kdebug.h +++ b/include/asm-ia64/kdebug.h | |||
@@ -28,21 +28,8 @@ | |||
28 | */ | 28 | */ |
29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
30 | 30 | ||
31 | struct pt_regs; | ||
32 | |||
33 | struct die_args { | ||
34 | struct pt_regs *regs; | ||
35 | const char *str; | ||
36 | long err; | ||
37 | int trapnr; | ||
38 | int signr; | ||
39 | }; | ||
40 | |||
41 | extern int register_die_notifier(struct notifier_block *); | ||
42 | extern int unregister_die_notifier(struct notifier_block *); | ||
43 | extern int register_page_fault_notifier(struct notifier_block *); | 31 | extern int register_page_fault_notifier(struct notifier_block *); |
44 | extern int unregister_page_fault_notifier(struct notifier_block *); | 32 | extern int unregister_page_fault_notifier(struct notifier_block *); |
45 | extern struct atomic_notifier_head ia64die_chain; | ||
46 | 33 | ||
47 | enum die_val { | 34 | enum die_val { |
48 | DIE_BREAK = 1, | 35 | DIE_BREAK = 1, |
@@ -74,18 +61,4 @@ enum die_val { | |||
74 | DIE_KDUMP_LEAVE, | 61 | DIE_KDUMP_LEAVE, |
75 | }; | 62 | }; |
76 | 63 | ||
77 | static inline int notify_die(enum die_val val, char *str, struct pt_regs *regs, | ||
78 | long err, int trap, int sig) | ||
79 | { | ||
80 | struct die_args args = { | ||
81 | .regs = regs, | ||
82 | .str = str, | ||
83 | .err = err, | ||
84 | .trapnr = trap, | ||
85 | .signr = sig | ||
86 | }; | ||
87 | |||
88 | return atomic_notifier_call_chain(&ia64die_chain, val, &args); | ||
89 | } | ||
90 | |||
91 | #endif | 64 | #endif |
diff --git a/include/asm-m32r/kdebug.h b/include/asm-m32r/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-m32r/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-m68k/kdebug.h b/include/asm-m68k/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-m68k/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-m68knommu/kdebug.h b/include/asm-m68knommu/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-m68knommu/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-mips/kdebug.h b/include/asm-mips/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-mips/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-parisc/kdebug.h b/include/asm-parisc/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-parisc/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-powerpc/kdebug.h b/include/asm-powerpc/kdebug.h index 532bfee934..1c73d2ec9b 100644 --- a/include/asm-powerpc/kdebug.h +++ b/include/asm-powerpc/kdebug.h | |||
@@ -6,18 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/notifier.h> | 7 | #include <linux/notifier.h> |
8 | 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 | extern int register_die_notifier(struct notifier_block *); | ||
20 | extern int unregister_die_notifier(struct notifier_block *); | ||
21 | extern int register_page_fault_notifier(struct notifier_block *); | 9 | extern int register_page_fault_notifier(struct notifier_block *); |
22 | extern int unregister_page_fault_notifier(struct notifier_block *); | 10 | extern int unregister_page_fault_notifier(struct notifier_block *); |
23 | extern struct atomic_notifier_head powerpc_die_chain; | 11 | extern struct atomic_notifier_head powerpc_die_chain; |
@@ -32,11 +20,5 @@ enum die_val { | |||
32 | DIE_PAGE_FAULT, | 20 | DIE_PAGE_FAULT, |
33 | }; | 21 | }; |
34 | 22 | ||
35 | static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig) | ||
36 | { | ||
37 | struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig }; | ||
38 | return atomic_notifier_call_chain(&powerpc_die_chain, val, &args); | ||
39 | } | ||
40 | |||
41 | #endif /* __KERNEL__ */ | 23 | #endif /* __KERNEL__ */ |
42 | #endif /* _ASM_POWERPC_KDEBUG_H */ | 24 | #endif /* _ASM_POWERPC_KDEBUG_H */ |
diff --git a/include/asm-ppc/kdebug.h b/include/asm-ppc/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-ppc/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-s390/kdebug.h b/include/asm-s390/kdebug.h index d2d7ad2761..04418af08f 100644 --- a/include/asm-s390/kdebug.h +++ b/include/asm-s390/kdebug.h | |||
@@ -8,21 +8,6 @@ | |||
8 | 8 | ||
9 | struct pt_regs; | 9 | struct pt_regs; |
10 | 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 | |||
26 | /* | 11 | /* |
27 | * These are only here because kprobes.c wants them to implement a | 12 | * These are only here because kprobes.c wants them to implement a |
28 | * blatant layering violation. Will hopefully go away soon once all | 13 | * blatant layering violation. Will hopefully go away soon once all |
@@ -37,8 +22,6 @@ static inline int unregister_page_fault_notifier(struct notifier_block *nb) | |||
37 | return 0; | 22 | return 0; |
38 | } | 23 | } |
39 | 24 | ||
40 | extern struct atomic_notifier_head s390die_chain; | ||
41 | |||
42 | enum die_val { | 25 | enum die_val { |
43 | DIE_OOPS = 1, | 26 | DIE_OOPS = 1, |
44 | DIE_BPT, | 27 | DIE_BPT, |
@@ -54,19 +37,6 @@ enum die_val { | |||
54 | DIE_NMI_IPI, | 37 | DIE_NMI_IPI, |
55 | }; | 38 | }; |
56 | 39 | ||
57 | static inline int notify_die(enum die_val val, const char *str, | ||
58 | struct pt_regs *regs, long err, int trap, int sig) | ||
59 | { | ||
60 | struct die_args args = { | ||
61 | .regs = regs, | ||
62 | .str = str, | ||
63 | .err = err, | ||
64 | .trapnr = trap, | ||
65 | .signr = sig | ||
66 | }; | ||
67 | return atomic_notifier_call_chain(&s390die_chain, val, &args); | ||
68 | } | ||
69 | |||
70 | extern void die(const char *, struct pt_regs *, long); | 40 | extern void die(const char *, struct pt_regs *, long); |
71 | 41 | ||
72 | #endif | 42 | #endif |
diff --git a/include/asm-sh/kdebug.h b/include/asm-sh/kdebug.h index ef009baf5a..493c206297 100644 --- a/include/asm-sh/kdebug.h +++ b/include/asm-sh/kdebug.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ASM_SH_KDEBUG_H | 2 | #define __ASM_SH_KDEBUG_H |
3 | 3 | ||
4 | #include <linux/notifier.h> | 4 | #include <linux/notifier.h> |
5 | #include <asm-generic/kdebug.h> | ||
5 | 6 | ||
6 | struct pt_regs; | 7 | struct pt_regs; |
7 | 8 | ||
diff --git a/include/asm-sh64/kdebug.h b/include/asm-sh64/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-sh64/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-sparc/kdebug.h b/include/asm-sparc/kdebug.h index fba92485fd..404d807673 100644 --- a/include/asm-sparc/kdebug.h +++ b/include/asm-sparc/kdebug.h | |||
@@ -66,4 +66,8 @@ static inline void sp_enter_debugger(void) | |||
66 | #define KDEBUG_DUNNO2_OFF 0x8 | 66 | #define KDEBUG_DUNNO2_OFF 0x8 |
67 | #define KDEBUG_TEACH_OFF 0xc | 67 | #define KDEBUG_TEACH_OFF 0xc |
68 | 68 | ||
69 | enum die_val { | ||
70 | DIE_UNUSED, | ||
71 | }; | ||
72 | |||
69 | #endif /* !(_SPARC_KDEBUG_H) */ | 73 | #endif /* !(_SPARC_KDEBUG_H) */ |
diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h index 11251bdd00..f8032e73f3 100644 --- a/include/asm-sparc64/kdebug.h +++ b/include/asm-sparc64/kdebug.h | |||
@@ -7,19 +7,8 @@ | |||
7 | 7 | ||
8 | struct pt_regs; | 8 | struct pt_regs; |
9 | 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 | extern int register_die_notifier(struct notifier_block *); | ||
19 | extern int unregister_die_notifier(struct notifier_block *); | ||
20 | extern int register_page_fault_notifier(struct notifier_block *); | 10 | extern int register_page_fault_notifier(struct notifier_block *); |
21 | extern int unregister_page_fault_notifier(struct notifier_block *); | 11 | extern int unregister_page_fault_notifier(struct notifier_block *); |
22 | extern struct atomic_notifier_head sparc64die_chain; | ||
23 | 12 | ||
24 | extern void bad_trap(struct pt_regs *, long); | 13 | extern void bad_trap(struct pt_regs *, long); |
25 | 14 | ||
@@ -36,16 +25,4 @@ enum die_val { | |||
36 | DIE_PAGE_FAULT, | 25 | DIE_PAGE_FAULT, |
37 | }; | 26 | }; |
38 | 27 | ||
39 | static inline int notify_die(enum die_val val,char *str, struct pt_regs *regs, | ||
40 | long err, int trap, int sig) | ||
41 | { | ||
42 | struct die_args args = { .regs = regs, | ||
43 | .str = str, | ||
44 | .err = err, | ||
45 | .trapnr = trap, | ||
46 | .signr = sig }; | ||
47 | |||
48 | return atomic_notifier_call_chain(&sparc64die_chain, val, &args); | ||
49 | } | ||
50 | |||
51 | #endif | 28 | #endif |
diff --git a/include/asm-um/kdebug.h b/include/asm-um/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-um/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-v850/kdebug.h b/include/asm-v850/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-v850/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index e9ce163b15..74feae945a 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
@@ -5,19 +5,8 @@ | |||
5 | 5 | ||
6 | struct pt_regs; | 6 | struct pt_regs; |
7 | 7 | ||
8 | struct die_args { | ||
9 | struct pt_regs *regs; | ||
10 | const char *str; | ||
11 | long err; | ||
12 | int trapnr; | ||
13 | int signr; | ||
14 | }; | ||
15 | |||
16 | extern int register_die_notifier(struct notifier_block *); | ||
17 | extern int unregister_die_notifier(struct notifier_block *); | ||
18 | extern int register_page_fault_notifier(struct notifier_block *); | 8 | extern int register_page_fault_notifier(struct notifier_block *); |
19 | extern int unregister_page_fault_notifier(struct notifier_block *); | 9 | extern int unregister_page_fault_notifier(struct notifier_block *); |
20 | extern struct atomic_notifier_head die_chain; | ||
21 | 10 | ||
22 | /* Grossly misnamed. */ | 11 | /* Grossly misnamed. */ |
23 | enum die_val { | 12 | enum die_val { |
@@ -37,19 +26,6 @@ enum die_val { | |||
37 | DIE_PAGE_FAULT, | 26 | DIE_PAGE_FAULT, |
38 | }; | 27 | }; |
39 | 28 | ||
40 | static inline int notify_die(enum die_val val, const char *str, | ||
41 | struct pt_regs *regs, long err, int trap, int sig) | ||
42 | { | ||
43 | struct die_args args = { | ||
44 | .regs = regs, | ||
45 | .str = str, | ||
46 | .err = err, | ||
47 | .trapnr = trap, | ||
48 | .signr = sig | ||
49 | }; | ||
50 | return atomic_notifier_call_chain(&die_chain, val, &args); | ||
51 | } | ||
52 | |||
53 | extern void printk_address(unsigned long address); | 29 | extern void printk_address(unsigned long address); |
54 | extern void die(const char *,struct pt_regs *,long); | 30 | extern void die(const char *,struct pt_regs *,long); |
55 | extern void __die(const char *,struct pt_regs *,long); | 31 | extern void __die(const char *,struct pt_regs *,long); |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index da3390faae..5f75ee5379 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -411,7 +411,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
411 | 411 | ||
412 | extern spinlock_t pgd_lock; | 412 | extern spinlock_t pgd_lock; |
413 | extern struct list_head pgd_list; | 413 | extern struct list_head pgd_list; |
414 | void vmalloc_sync_all(void); | ||
415 | 414 | ||
416 | extern int kern_addr_valid(unsigned long addr); | 415 | extern int kern_addr_valid(unsigned long addr); |
417 | 416 | ||
diff --git a/include/asm-xtensa/kdebug.h b/include/asm-xtensa/kdebug.h new file mode 100644 index 0000000000..6ece1b0376 --- /dev/null +++ b/include/asm-xtensa/kdebug.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/kdebug.h> | |||
diff --git a/include/linux/kdebug.h b/include/linux/kdebug.h new file mode 100644 index 0000000000..5db38d6d8b --- /dev/null +++ b/include/linux/kdebug.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef _LINUX_KDEBUG_H | ||
2 | #define _LINUX_KDEBUG_H | ||
3 | |||
4 | #include <asm/kdebug.h> | ||
5 | |||
6 | struct die_args { | ||
7 | struct pt_regs *regs; | ||
8 | const char *str; | ||
9 | long err; | ||
10 | int trapnr; | ||
11 | int signr; | ||
12 | }; | ||
13 | |||
14 | int register_die_notifier(struct notifier_block *nb); | ||
15 | int unregister_die_notifier(struct notifier_block *nb); | ||
16 | |||
17 | int notify_die(enum die_val val, const char *str, | ||
18 | struct pt_regs *regs, long err, int trap, int sig); | ||
19 | |||
20 | #endif /* _LINUX_KDEBUG_H */ | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 924e502905..4b7ee83787 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -53,6 +53,7 @@ extern void vunmap(void *addr); | |||
53 | 53 | ||
54 | extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, | 54 | extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, |
55 | unsigned long pgoff); | 55 | unsigned long pgoff); |
56 | void vmalloc_sync_all(void); | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * Lowlevel-APIs (not for driver use!) | 59 | * Lowlevel-APIs (not for driver use!) |