diff options
author | Pekka Paalanen <pq@iki.fi> | 2008-09-16 15:00:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:37:11 -0400 |
commit | 9e57fb35d711331a9b1410c5c56ebeb3733428a0 (patch) | |
tree | 2e68b1b8bb233378cbcad0c8e9bc8f99abf7263a /include | |
parent | 801fe40001dfc263848552fb28924b766ed44ea4 (diff) |
x86 mmiotrace: implement mmiotrace_printk()
Offer mmiotrace users a function to inject markers from inside the kernel.
This depends on the trace_vprintk() patch.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmiotrace.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index 61d19e1b7a0b..60cc3bf5c538 100644 --- a/include/linux/mmiotrace.h +++ b/include/linux/mmiotrace.h | |||
@@ -34,11 +34,15 @@ extern void unregister_kmmio_probe(struct kmmio_probe *p); | |||
34 | /* Called from page fault handler. */ | 34 | /* Called from page fault handler. */ |
35 | extern int kmmio_handler(struct pt_regs *regs, unsigned long addr); | 35 | extern int kmmio_handler(struct pt_regs *regs, unsigned long addr); |
36 | 36 | ||
37 | /* Called from ioremap.c */ | ||
38 | #ifdef CONFIG_MMIOTRACE | 37 | #ifdef CONFIG_MMIOTRACE |
38 | /* Called from ioremap.c */ | ||
39 | extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size, | 39 | extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size, |
40 | void __iomem *addr); | 40 | void __iomem *addr); |
41 | extern void mmiotrace_iounmap(volatile void __iomem *addr); | 41 | extern void mmiotrace_iounmap(volatile void __iomem *addr); |
42 | |||
43 | /* For anyone to insert markers. Remember trailing newline. */ | ||
44 | extern int mmiotrace_printk(const char *fmt, ...) | ||
45 | __attribute__ ((format (printf, 1, 2))); | ||
42 | #else | 46 | #else |
43 | static inline void mmiotrace_ioremap(resource_size_t offset, | 47 | static inline void mmiotrace_ioremap(resource_size_t offset, |
44 | unsigned long size, void __iomem *addr) | 48 | unsigned long size, void __iomem *addr) |
@@ -48,7 +52,15 @@ static inline void mmiotrace_ioremap(resource_size_t offset, | |||
48 | static inline void mmiotrace_iounmap(volatile void __iomem *addr) | 52 | static inline void mmiotrace_iounmap(volatile void __iomem *addr) |
49 | { | 53 | { |
50 | } | 54 | } |
51 | #endif /* CONFIG_MMIOTRACE_HOOKS */ | 55 | |
56 | static inline int mmiotrace_printk(const char *fmt, ...) | ||
57 | __attribute__ ((format (printf, 1, 0))); | ||
58 | |||
59 | static inline int mmiotrace_printk(const char *fmt, ...) | ||
60 | { | ||
61 | return 0; | ||
62 | } | ||
63 | #endif /* CONFIG_MMIOTRACE */ | ||
52 | 64 | ||
53 | enum mm_io_opcode { | 65 | enum mm_io_opcode { |
54 | MMIO_READ = 0x1, /* struct mmiotrace_rw */ | 66 | MMIO_READ = 0x1, /* struct mmiotrace_rw */ |
@@ -81,5 +93,6 @@ extern void enable_mmiotrace(void); | |||
81 | extern void disable_mmiotrace(void); | 93 | extern void disable_mmiotrace(void); |
82 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); | 94 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); |
83 | extern void mmio_trace_mapping(struct mmiotrace_map *map); | 95 | extern void mmio_trace_mapping(struct mmiotrace_map *map); |
96 | extern int mmio_trace_printk(const char *fmt, va_list args); | ||
84 | 97 | ||
85 | #endif /* MMIOTRACE_H */ | 98 | #endif /* MMIOTRACE_H */ |