diff options
author | Pekka Paalanen <pq@iki.fi> | 2008-05-12 15:20:57 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-24 05:22:24 -0400 |
commit | d61fc44853f46fb002228b18aa5f30db21fcd4ac (patch) | |
tree | 14fa9416aeceb7c5d24876c1111f6f2458a1dc7d /include/linux/mmiotrace.h | |
parent | 0fd0e3da4557c479b820b9a4a7afa25b4637ddf2 (diff) |
x86: mmiotrace, preview 2
Kconfig.debug, Makefile and testmmiotrace.c style fixes.
Use real mutex instead of mutex.
Fix failure path in register probe func.
kmmio: RCU read-locked over single stepping.
Generate mapping id's.
Make mmio-mod.c built-in and rewrite its locking.
Add debugfs file to enable/disable mmiotracing.
kmmio: use irqsave spinlocks.
Lots of cleanups in mmio-mod.c
Marker file moved from /proc into debugfs.
Call mmiotrace entrypoints directly from ioremap.c.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/mmiotrace.h')
-rw-r--r-- | include/linux/mmiotrace.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index d87a6cd8b686..cb5efd0c7f51 100644 --- a/include/linux/mmiotrace.h +++ b/include/linux/mmiotrace.h | |||
@@ -16,11 +16,12 @@ typedef void (*kmmio_post_handler_t)(struct kmmio_probe *, | |||
16 | unsigned long condition, struct pt_regs *); | 16 | unsigned long condition, struct pt_regs *); |
17 | 17 | ||
18 | struct kmmio_probe { | 18 | struct kmmio_probe { |
19 | struct list_head list; | 19 | struct list_head list; /* kmmio internal list */ |
20 | unsigned long addr; /* start location of the probe point */ | 20 | unsigned long addr; /* start location of the probe point */ |
21 | unsigned long len; /* length of the probe region */ | 21 | unsigned long len; /* length of the probe region */ |
22 | kmmio_pre_handler_t pre_handler; /* Called before addr is executed. */ | 22 | kmmio_pre_handler_t pre_handler; /* Called before addr is executed. */ |
23 | kmmio_post_handler_t post_handler; /* Called after addr is executed */ | 23 | kmmio_post_handler_t post_handler; /* Called after addr is executed */ |
24 | void *user_data; | ||
24 | }; | 25 | }; |
25 | 26 | ||
26 | /* kmmio is active by some kmmio_probes? */ | 27 | /* kmmio is active by some kmmio_probes? */ |
@@ -38,6 +39,21 @@ extern void unregister_kmmio_probe(struct kmmio_probe *p); | |||
38 | /* Called from page fault handler. */ | 39 | /* Called from page fault handler. */ |
39 | extern int kmmio_handler(struct pt_regs *regs, unsigned long addr); | 40 | extern int kmmio_handler(struct pt_regs *regs, unsigned long addr); |
40 | 41 | ||
42 | /* Called from ioremap.c */ | ||
43 | #ifdef CONFIG_MMIOTRACE | ||
44 | extern void | ||
45 | mmiotrace_ioremap(unsigned long offset, unsigned long size, void __iomem *addr); | ||
46 | extern void mmiotrace_iounmap(volatile void __iomem *addr); | ||
47 | #else | ||
48 | static inline void | ||
49 | mmiotrace_ioremap(unsigned long offset, unsigned long size, void __iomem *addr) | ||
50 | { | ||
51 | } | ||
52 | static inline void mmiotrace_iounmap(volatile void __iomem *addr) | ||
53 | { | ||
54 | } | ||
55 | #endif /* CONFIG_MMIOTRACE_HOOKS */ | ||
56 | |||
41 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
42 | 58 | ||
43 | 59 | ||