diff options
Diffstat (limited to 'include/linux/mmiotrace.h')
-rw-r--r-- | include/linux/mmiotrace.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index 61d19e1b7a0b..139d7c88d9c9 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,15 +52,22 @@ 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 */ |
55 | MMIO_WRITE = 0x2, /* struct mmiotrace_rw */ | 67 | MMIO_WRITE = 0x2, /* struct mmiotrace_rw */ |
56 | MMIO_PROBE = 0x3, /* struct mmiotrace_map */ | 68 | MMIO_PROBE = 0x3, /* struct mmiotrace_map */ |
57 | MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */ | 69 | MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */ |
58 | MMIO_MARKER = 0x5, /* raw char data */ | 70 | MMIO_UNKNOWN_OP = 0x5, /* struct mmiotrace_rw */ |
59 | MMIO_UNKNOWN_OP = 0x6, /* struct mmiotrace_rw */ | ||
60 | }; | 71 | }; |
61 | 72 | ||
62 | struct mmiotrace_rw { | 73 | struct mmiotrace_rw { |
@@ -81,5 +92,6 @@ extern void enable_mmiotrace(void); | |||
81 | extern void disable_mmiotrace(void); | 92 | extern void disable_mmiotrace(void); |
82 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); | 93 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); |
83 | extern void mmio_trace_mapping(struct mmiotrace_map *map); | 94 | extern void mmio_trace_mapping(struct mmiotrace_map *map); |
95 | extern int mmio_trace_printk(const char *fmt, va_list args); | ||
84 | 96 | ||
85 | #endif /* MMIOTRACE_H */ | 97 | #endif /* MMIOTRACE_H */ |