Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux/fpc-iii.git] / include / trace / events / fsi.h
blob9832cb8e0eb069610da04d05e8aef39f63e9c1de
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #undef TRACE_SYSTEM
4 #define TRACE_SYSTEM fsi
6 #if !defined(_TRACE_FSI_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_FSI_H
9 #include <linux/tracepoint.h>
11 TRACE_EVENT(fsi_master_read,
12 TP_PROTO(const struct fsi_master *master, int link, int id,
13 uint32_t addr, size_t size),
14 TP_ARGS(master, link, id, addr, size),
15 TP_STRUCT__entry(
16 __field(int, master_idx)
17 __field(int, link)
18 __field(int, id)
19 __field(__u32, addr)
20 __field(size_t, size)
22 TP_fast_assign(
23 __entry->master_idx = master->idx;
24 __entry->link = link;
25 __entry->id = id;
26 __entry->addr = addr;
27 __entry->size = size;
29 TP_printk("fsi%d:%02d:%02d %08x[%zu]",
30 __entry->master_idx,
31 __entry->link,
32 __entry->id,
33 __entry->addr,
34 __entry->size
38 TRACE_EVENT(fsi_master_write,
39 TP_PROTO(const struct fsi_master *master, int link, int id,
40 uint32_t addr, size_t size, const void *data),
41 TP_ARGS(master, link, id, addr, size, data),
42 TP_STRUCT__entry(
43 __field(int, master_idx)
44 __field(int, link)
45 __field(int, id)
46 __field(__u32, addr)
47 __field(size_t, size)
48 __field(__u32, data)
50 TP_fast_assign(
51 __entry->master_idx = master->idx;
52 __entry->link = link;
53 __entry->id = id;
54 __entry->addr = addr;
55 __entry->size = size;
56 __entry->data = 0;
57 memcpy(&__entry->data, data, size);
59 TP_printk("fsi%d:%02d:%02d %08x[%zu] <= {%*ph}",
60 __entry->master_idx,
61 __entry->link,
62 __entry->id,
63 __entry->addr,
64 __entry->size,
65 (int)__entry->size, &__entry->data
69 TRACE_EVENT(fsi_master_rw_result,
70 TP_PROTO(const struct fsi_master *master, int link, int id,
71 uint32_t addr, size_t size,
72 bool write, const void *data, int ret),
73 TP_ARGS(master, link, id, addr, size, write, data, ret),
74 TP_STRUCT__entry(
75 __field(int, master_idx)
76 __field(int, link)
77 __field(int, id)
78 __field(__u32, addr)
79 __field(size_t, size)
80 __field(bool, write)
81 __field(__u32, data)
82 __field(int, ret)
84 TP_fast_assign(
85 __entry->master_idx = master->idx;
86 __entry->link = link;
87 __entry->id = id;
88 __entry->addr = addr;
89 __entry->size = size;
90 __entry->write = write;
91 __entry->data = 0;
92 __entry->ret = ret;
93 if (__entry->write || !__entry->ret)
94 memcpy(&__entry->data, data, size);
96 TP_printk("fsi%d:%02d:%02d %08x[%zu] %s {%*ph} ret %d",
97 __entry->master_idx,
98 __entry->link,
99 __entry->id,
100 __entry->addr,
101 __entry->size,
102 __entry->write ? "<=" : "=>",
103 (int)__entry->size, &__entry->data,
104 __entry->ret
108 TRACE_EVENT(fsi_master_break,
109 TP_PROTO(const struct fsi_master *master, int link),
110 TP_ARGS(master, link),
111 TP_STRUCT__entry(
112 __field(int, master_idx)
113 __field(int, link)
115 TP_fast_assign(
116 __entry->master_idx = master->idx;
117 __entry->link = link;
119 TP_printk("fsi%d:%d",
120 __entry->master_idx,
121 __entry->link
126 #endif /* _TRACE_FSI_H */
128 #include <trace/define_trace.h>