diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/kdebug.h | 7 | ||||
-rw-r--r-- | include/linux/mmiotrace.h | 38 |
2 files changed, 38 insertions, 7 deletions
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h index 7063281040da..96651bb59ba1 100644 --- a/include/asm-x86/kdebug.h +++ b/include/asm-x86/kdebug.h | |||
@@ -35,11 +35,4 @@ extern void show_regs(struct pt_regs *regs); | |||
35 | extern unsigned long oops_begin(void); | 35 | extern unsigned long oops_begin(void); |
36 | extern void oops_end(unsigned long, struct pt_regs *, int signr); | 36 | extern void oops_end(unsigned long, struct pt_regs *, int signr); |
37 | 37 | ||
38 | typedef int (*pf_handler_func)(struct pt_regs *regs, | ||
39 | unsigned long error_code, | ||
40 | unsigned long address); | ||
41 | |||
42 | extern int mmiotrace_register_pf(pf_handler_func new_pfh); | ||
43 | extern int mmiotrace_unregister_pf(pf_handler_func old_pfh); | ||
44 | |||
45 | #endif | 38 | #endif |
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index 6ec288f1fe24..d87a6cd8b686 100644 --- a/include/linux/mmiotrace.h +++ b/include/linux/mmiotrace.h | |||
@@ -3,6 +3,44 @@ | |||
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | ||
7 | |||
8 | #include <linux/list.h> | ||
9 | |||
10 | struct kmmio_probe; | ||
11 | struct pt_regs; | ||
12 | |||
13 | typedef void (*kmmio_pre_handler_t)(struct kmmio_probe *, | ||
14 | struct pt_regs *, unsigned long addr); | ||
15 | typedef void (*kmmio_post_handler_t)(struct kmmio_probe *, | ||
16 | unsigned long condition, struct pt_regs *); | ||
17 | |||
18 | struct kmmio_probe { | ||
19 | struct list_head list; | ||
20 | unsigned long addr; /* start location of the probe point */ | ||
21 | unsigned long len; /* length of the probe region */ | ||
22 | kmmio_pre_handler_t pre_handler; /* Called before addr is executed. */ | ||
23 | kmmio_post_handler_t post_handler; /* Called after addr is executed */ | ||
24 | }; | ||
25 | |||
26 | /* kmmio is active by some kmmio_probes? */ | ||
27 | static inline int is_kmmio_active(void) | ||
28 | { | ||
29 | extern unsigned int kmmio_count; | ||
30 | return kmmio_count; | ||
31 | } | ||
32 | |||
33 | extern void reference_kmmio(void); | ||
34 | extern void unreference_kmmio(void); | ||
35 | extern int register_kmmio_probe(struct kmmio_probe *p); | ||
36 | extern void unregister_kmmio_probe(struct kmmio_probe *p); | ||
37 | |||
38 | /* Called from page fault handler. */ | ||
39 | extern int kmmio_handler(struct pt_regs *regs, unsigned long addr); | ||
40 | |||
41 | #endif /* __KERNEL__ */ | ||
42 | |||
43 | |||
6 | /* | 44 | /* |
7 | * If you change anything here, you must bump MMIO_VERSION. | 45 | * If you change anything here, you must bump MMIO_VERSION. |
8 | * This is the relay data format for user space. | 46 | * This is the relay data format for user space. |