4 #include <linux/list.h>
5 #include <linux/notifier.h>
7 #include <linux/types.h>
8 #include <linux/ptrace.h>
9 #include <linux/version.h>
10 #include <linux/kdebug.h>
13 struct kmmio_fault_page;
16 typedef void (*kmmio_pre_handler_t)(struct kmmio_probe *,
17 struct pt_regs *, unsigned long addr);
18 typedef void (*kmmio_post_handler_t)(struct kmmio_probe *,
19 unsigned long condition, struct pt_regs *);
22 struct list_head list;
24 /* start location of the probe point */
27 /* length of the probe region */
30 /* Called before addr is executed. */
31 kmmio_pre_handler_t pre_handler;
33 /* Called after addr is executed, unless... */
34 kmmio_post_handler_t post_handler;
37 struct kmmio_fault_page {
38 struct list_head list;
40 /* location of the fault page */
46 /* kmmio is active by some kmmio_probes? */
47 static inline int is_kmmio_active(void)
49 extern unsigned int kmmio_count;
54 void cleanup_kmmio(void);
55 int register_kmmio_probe(struct kmmio_probe *p);
56 void unregister_kmmio_probe(struct kmmio_probe *p);
58 #endif /* _LINUX_KMMIO_H */