drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / drivers / base / regmap / trace.h
blobbcc5a8b226a6f49372e1b4a576009b7709c7360d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM regmap
5 #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_REGMAP_H
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
11 #include "internal.h"
14 * Log register events
16 DECLARE_EVENT_CLASS(regmap_reg,
18 TP_PROTO(struct regmap *map, unsigned int reg,
19 unsigned int val),
21 TP_ARGS(map, reg, val),
23 TP_STRUCT__entry(
24 __string( name, regmap_name(map) )
25 __field( unsigned int, reg )
26 __field( unsigned int, val )
29 TP_fast_assign(
30 __assign_str(name);
31 __entry->reg = reg;
32 __entry->val = val;
35 TP_printk("%s reg=%x val=%x", __get_str(name), __entry->reg, __entry->val)
38 DEFINE_EVENT(regmap_reg, regmap_reg_write,
40 TP_PROTO(struct regmap *map, unsigned int reg,
41 unsigned int val),
43 TP_ARGS(map, reg, val)
46 DEFINE_EVENT(regmap_reg, regmap_reg_read,
48 TP_PROTO(struct regmap *map, unsigned int reg,
49 unsigned int val),
51 TP_ARGS(map, reg, val)
54 DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
56 TP_PROTO(struct regmap *map, unsigned int reg,
57 unsigned int val),
59 TP_ARGS(map, reg, val)
62 DECLARE_EVENT_CLASS(regmap_bulk,
64 TP_PROTO(struct regmap *map, unsigned int reg,
65 const void *val, int val_len),
67 TP_ARGS(map, reg, val, val_len),
69 TP_STRUCT__entry(
70 __string(name, regmap_name(map))
71 __field(unsigned int, reg)
72 __dynamic_array(char, buf, val_len)
73 __field(int, val_len)
76 TP_fast_assign(
77 __assign_str(name);
78 __entry->reg = reg;
79 __entry->val_len = val_len;
80 memcpy(__get_dynamic_array(buf), val, val_len);
83 TP_printk("%s reg=%x val=%s", __get_str(name), __entry->reg,
84 __print_hex(__get_dynamic_array(buf), __entry->val_len))
87 DEFINE_EVENT(regmap_bulk, regmap_bulk_write,
89 TP_PROTO(struct regmap *map, unsigned int reg,
90 const void *val, int val_len),
92 TP_ARGS(map, reg, val, val_len)
95 DEFINE_EVENT(regmap_bulk, regmap_bulk_read,
97 TP_PROTO(struct regmap *map, unsigned int reg,
98 const void *val, int val_len),
100 TP_ARGS(map, reg, val, val_len)
103 DECLARE_EVENT_CLASS(regmap_block,
105 TP_PROTO(struct regmap *map, unsigned int reg, int count),
107 TP_ARGS(map, reg, count),
109 TP_STRUCT__entry(
110 __string( name, regmap_name(map) )
111 __field( unsigned int, reg )
112 __field( int, count )
115 TP_fast_assign(
116 __assign_str(name);
117 __entry->reg = reg;
118 __entry->count = count;
121 TP_printk("%s reg=%x count=%d", __get_str(name), __entry->reg, __entry->count)
124 DEFINE_EVENT(regmap_block, regmap_hw_read_start,
126 TP_PROTO(struct regmap *map, unsigned int reg, int count),
128 TP_ARGS(map, reg, count)
131 DEFINE_EVENT(regmap_block, regmap_hw_read_done,
133 TP_PROTO(struct regmap *map, unsigned int reg, int count),
135 TP_ARGS(map, reg, count)
138 DEFINE_EVENT(regmap_block, regmap_hw_write_start,
140 TP_PROTO(struct regmap *map, unsigned int reg, int count),
142 TP_ARGS(map, reg, count)
145 DEFINE_EVENT(regmap_block, regmap_hw_write_done,
147 TP_PROTO(struct regmap *map, unsigned int reg, int count),
149 TP_ARGS(map, reg, count)
152 TRACE_EVENT(regcache_sync,
154 TP_PROTO(struct regmap *map, const char *type,
155 const char *status),
157 TP_ARGS(map, type, status),
159 TP_STRUCT__entry(
160 __string( name, regmap_name(map) )
161 __string( status, status )
162 __string( type, type )
165 TP_fast_assign(
166 __assign_str(name);
167 __assign_str(status);
168 __assign_str(type);
171 TP_printk("%s type=%s status=%s", __get_str(name),
172 __get_str(type), __get_str(status))
175 DECLARE_EVENT_CLASS(regmap_bool,
177 TP_PROTO(struct regmap *map, bool flag),
179 TP_ARGS(map, flag),
181 TP_STRUCT__entry(
182 __string( name, regmap_name(map) )
183 __field( int, flag )
186 TP_fast_assign(
187 __assign_str(name);
188 __entry->flag = flag;
191 TP_printk("%s flag=%d", __get_str(name), __entry->flag)
194 DEFINE_EVENT(regmap_bool, regmap_cache_only,
196 TP_PROTO(struct regmap *map, bool flag),
198 TP_ARGS(map, flag)
201 DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
203 TP_PROTO(struct regmap *map, bool flag),
205 TP_ARGS(map, flag)
208 DECLARE_EVENT_CLASS(regmap_async,
210 TP_PROTO(struct regmap *map),
212 TP_ARGS(map),
214 TP_STRUCT__entry(
215 __string( name, regmap_name(map) )
218 TP_fast_assign(
219 __assign_str(name);
222 TP_printk("%s", __get_str(name))
225 DEFINE_EVENT(regmap_block, regmap_async_write_start,
227 TP_PROTO(struct regmap *map, unsigned int reg, int count),
229 TP_ARGS(map, reg, count)
232 DEFINE_EVENT(regmap_async, regmap_async_io_complete,
234 TP_PROTO(struct regmap *map),
236 TP_ARGS(map)
239 DEFINE_EVENT(regmap_async, regmap_async_complete_start,
241 TP_PROTO(struct regmap *map),
243 TP_ARGS(map)
246 DEFINE_EVENT(regmap_async, regmap_async_complete_done,
248 TP_PROTO(struct regmap *map),
250 TP_ARGS(map)
253 TRACE_EVENT(regcache_drop_region,
255 TP_PROTO(struct regmap *map, unsigned int from,
256 unsigned int to),
258 TP_ARGS(map, from, to),
260 TP_STRUCT__entry(
261 __string( name, regmap_name(map) )
262 __field( unsigned int, from )
263 __field( unsigned int, to )
266 TP_fast_assign(
267 __assign_str(name);
268 __entry->from = from;
269 __entry->to = to;
272 TP_printk("%s %u-%u", __get_str(name), __entry->from, __entry->to)
275 #endif /* _TRACE_REGMAP_H */
277 #undef TRACE_INCLUDE_PATH
278 #define TRACE_INCLUDE_PATH .
280 #undef TRACE_INCLUDE_FILE
281 #define TRACE_INCLUDE_FILE trace
283 /* This part must be outside protection */
284 #include <trace/define_trace.h>