1 /* SPDX-License-Identifier: GPL-2.0 */
4 #define TRACE_SYSTEM qcom_glink
6 #if !defined(__QCOM_GLINK_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
7 #define __QCOM_GLINK_TRACE_H__
9 #include <linux/tracepoint.h>
10 #include "qcom_glink_native.h"
13 TRACE_EVENT(qcom_glink_cmd_version
,
14 TP_PROTO(const char *remote
, unsigned int version
, unsigned int features
, bool tx
),
15 TP_ARGS(remote
, version
, features
, tx
),
17 __string(remote
, remote
)
19 __field(u32
, features
)
24 __entry
->version
= version
;
25 __entry
->features
= features
;
28 TP_printk("%s remote: %s version: %u features: %#x",
29 __entry
->tx
? "tx" : "rx",
35 #define trace_qcom_glink_cmd_version_tx(...) trace_qcom_glink_cmd_version(__VA_ARGS__, true)
36 #define trace_qcom_glink_cmd_version_rx(...) trace_qcom_glink_cmd_version(__VA_ARGS__, false)
38 TRACE_EVENT(qcom_glink_cmd_version_ack
,
39 TP_PROTO(const char *remote
, unsigned int version
, unsigned int features
, bool tx
),
40 TP_ARGS(remote
, version
, features
, tx
),
42 __string(remote
, remote
)
44 __field(u32
, features
)
49 __entry
->version
= version
;
50 __entry
->features
= features
;
53 TP_printk("%s remote: %s version: %u features: %#x",
54 __entry
->tx
? "tx" : "rx",
60 #define trace_qcom_glink_cmd_version_ack_tx(...) trace_qcom_glink_cmd_version_ack(__VA_ARGS__, true)
61 #define trace_qcom_glink_cmd_version_ack_rx(...) trace_qcom_glink_cmd_version_ack(__VA_ARGS__, false)
63 TRACE_EVENT(qcom_glink_cmd_open
,
64 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, bool tx
),
65 TP_ARGS(remote
, channel
, lcid
, rcid
, tx
),
67 __string(remote
, remote
)
68 __string(channel
, channel
)
75 __assign_str(channel
);
80 TP_printk("%s remote: %s channel: %s[%u/%u]",
81 __entry
->tx
? "tx" : "rx",
88 #define trace_qcom_glink_cmd_open_tx(...) trace_qcom_glink_cmd_open(__VA_ARGS__, true)
89 #define trace_qcom_glink_cmd_open_rx(...) trace_qcom_glink_cmd_open(__VA_ARGS__, false)
91 TRACE_EVENT(qcom_glink_cmd_close
,
92 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, bool tx
),
93 TP_ARGS(remote
, channel
, lcid
, rcid
, tx
),
95 __string(remote
, remote
)
96 __string(channel
, channel
)
102 __assign_str(remote
);
103 __assign_str(channel
);
104 __entry
->lcid
= lcid
;
105 __entry
->rcid
= rcid
;
108 TP_printk("%s remote: %s channel: %s[%u/%u]",
109 __entry
->tx
? "tx" : "rx",
116 #define trace_qcom_glink_cmd_close_tx(...) trace_qcom_glink_cmd_close(__VA_ARGS__, true)
117 #define trace_qcom_glink_cmd_close_rx(...) trace_qcom_glink_cmd_close(__VA_ARGS__, false)
119 TRACE_EVENT(qcom_glink_cmd_open_ack
,
120 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, bool tx
),
121 TP_ARGS(remote
, channel
, lcid
, rcid
, tx
),
123 __string(remote
, remote
)
124 __string(channel
, channel
)
130 __assign_str(remote
);
131 __assign_str(channel
);
132 __entry
->lcid
= lcid
;
133 __entry
->rcid
= rcid
;
136 TP_printk("%s remote: %s channel: %s[%u/%u]",
137 __entry
->tx
? "tx" : "rx",
144 #define trace_qcom_glink_cmd_open_ack_tx(...) trace_qcom_glink_cmd_open_ack(__VA_ARGS__, true)
145 #define trace_qcom_glink_cmd_open_ack_rx(...) trace_qcom_glink_cmd_open_ack(__VA_ARGS__, false)
147 TRACE_EVENT(qcom_glink_cmd_intent
,
148 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, size_t count
, size_t size
, u32 liid
, bool tx
),
149 TP_ARGS(remote
, channel
, lcid
, rcid
, count
, size
, liid
, tx
),
151 __string(remote
, remote
)
152 __string(channel
, channel
)
161 __assign_str(remote
);
162 __assign_str(channel
);
163 __entry
->lcid
= lcid
;
164 __entry
->rcid
= rcid
;
165 __entry
->count
= count
;
166 __entry
->size
= size
;
167 __entry
->liid
= liid
;
170 TP_printk("%s remote: %s channel: %s[%u/%u] count: %d [size: %d liid: %d]",
171 __entry
->tx
? "tx" : "rx",
181 #define trace_qcom_glink_cmd_intent_tx(...) trace_qcom_glink_cmd_intent(__VA_ARGS__, true)
182 #define trace_qcom_glink_cmd_intent_rx(...) trace_qcom_glink_cmd_intent(__VA_ARGS__, false)
184 TRACE_EVENT(qcom_glink_cmd_rx_done
,
185 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, u32 iid
, bool reuse
, bool tx
),
186 TP_ARGS(remote
, channel
, lcid
, rcid
, iid
, reuse
, tx
),
188 __string(remote
, remote
)
189 __string(channel
, channel
)
197 __assign_str(remote
);
198 __assign_str(channel
);
199 __entry
->lcid
= lcid
;
200 __entry
->rcid
= rcid
;
202 __entry
->reuse
= reuse
;
205 TP_printk("%s remote: %s channel: %s[%u/%u] iid: %d reuse: %d",
206 __entry
->tx
? "tx" : "rx",
215 #define trace_qcom_glink_cmd_rx_done_tx(...) trace_qcom_glink_cmd_rx_done(__VA_ARGS__, true)
216 #define trace_qcom_glink_cmd_rx_done_rx(...) trace_qcom_glink_cmd_rx_done(__VA_ARGS__, false)
218 TRACE_EVENT(qcom_glink_cmd_rx_intent_req
,
219 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, size_t size
, bool tx
),
220 TP_ARGS(remote
, channel
, lcid
, rcid
, size
, tx
),
222 __string(remote
, remote
)
223 __string(channel
, channel
)
230 __assign_str(remote
);
231 __assign_str(channel
);
232 __entry
->lcid
= lcid
;
233 __entry
->rcid
= rcid
;
234 __entry
->size
= size
;
237 TP_printk("%s remote: %s channel: %s[%u/%u] size: %d",
238 __entry
->tx
? "tx" : "rx",
246 #define trace_qcom_glink_cmd_rx_intent_req_tx(...) trace_qcom_glink_cmd_rx_intent_req(__VA_ARGS__, true)
247 #define trace_qcom_glink_cmd_rx_intent_req_rx(...) trace_qcom_glink_cmd_rx_intent_req(__VA_ARGS__, false)
249 TRACE_EVENT(qcom_glink_cmd_rx_intent_req_ack
,
250 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, bool granted
, bool tx
),
251 TP_ARGS(remote
, channel
, lcid
, rcid
, granted
, tx
),
253 __string(remote
, remote
)
254 __string(channel
, channel
)
257 __field(bool, granted
)
261 __assign_str(remote
);
262 __assign_str(channel
);
263 __entry
->lcid
= lcid
;
264 __entry
->rcid
= rcid
;
265 __entry
->granted
= granted
;
268 TP_printk("%s remote: %s channel: %s[%u/%u] granted: %d",
269 __entry
->tx
? "tx" : "rx",
277 #define trace_qcom_glink_cmd_rx_intent_req_ack_tx(...) trace_qcom_glink_cmd_rx_intent_req_ack(__VA_ARGS__, true)
278 #define trace_qcom_glink_cmd_rx_intent_req_ack_rx(...) trace_qcom_glink_cmd_rx_intent_req_ack(__VA_ARGS__, false)
280 TRACE_EVENT(qcom_glink_cmd_tx_data
,
281 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, u32 iid
, u32 chunk_size
, u32 left_size
, bool cont
, bool tx
),
282 TP_ARGS(remote
, channel
, lcid
, rcid
, iid
, chunk_size
, left_size
, cont
, tx
),
284 __string(remote
, remote
)
285 __string(channel
, channel
)
289 __field(u32
, chunk_size
)
290 __field(u32
, left_size
)
295 __assign_str(remote
);
296 __assign_str(channel
);
297 __entry
->lcid
= lcid
;
298 __entry
->rcid
= rcid
;
300 __entry
->chunk_size
= chunk_size
;
301 __entry
->left_size
= left_size
;
302 __entry
->cont
= cont
;
305 TP_printk("%s remote: %s channel: %s[%u/%u] iid: %d chunk_size: %d left_size: %d cont: %d",
306 __entry
->tx
? "tx" : "rx",
317 #define trace_qcom_glink_cmd_tx_data_tx(...) trace_qcom_glink_cmd_tx_data(__VA_ARGS__, true)
318 #define trace_qcom_glink_cmd_tx_data_rx(...) trace_qcom_glink_cmd_tx_data(__VA_ARGS__, false)
320 TRACE_EVENT(qcom_glink_cmd_close_ack
,
321 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, bool tx
),
322 TP_ARGS(remote
, channel
, lcid
, rcid
, tx
),
324 __string(remote
, remote
)
325 __string(channel
, channel
)
331 __assign_str(remote
);
332 __assign_str(channel
);
333 __entry
->lcid
= lcid
;
334 __entry
->rcid
= rcid
;
337 TP_printk("%s remote: %s channel: %s[%u/%u]",
338 __entry
->tx
? "tx" : "rx",
345 #define trace_qcom_glink_cmd_close_ack_tx(...) trace_qcom_glink_cmd_close_ack(__VA_ARGS__, true)
346 #define trace_qcom_glink_cmd_close_ack_rx(...) trace_qcom_glink_cmd_close_ack(__VA_ARGS__, false)
348 TRACE_EVENT(qcom_glink_cmd_read_notif
,
349 TP_PROTO(const char *remote
, bool tx
),
352 __string(remote
, remote
)
356 __assign_str(remote
);
359 TP_printk("%s remote: %s",
360 __entry
->tx
? "tx" : "rx",
364 #define trace_qcom_glink_cmd_read_notif_tx(...) trace_qcom_glink_cmd_read_notif(__VA_ARGS__, true)
365 #define trace_qcom_glink_cmd_read_notif_rx(...) trace_qcom_glink_cmd_read_notif(__VA_ARGS__, false)
367 TRACE_EVENT(qcom_glink_cmd_signal
,
368 TP_PROTO(const char *remote
, const char *channel
, u16 lcid
, u16 rcid
, unsigned int signals
, bool tx
),
369 TP_ARGS(remote
, channel
, lcid
, rcid
, signals
, tx
),
371 __string(remote
, remote
)
372 __string(channel
, channel
)
375 __field(u32
, signals
)
379 __assign_str(remote
);
380 __assign_str(channel
);
381 __entry
->lcid
= lcid
;
382 __entry
->rcid
= rcid
;
383 __entry
->signals
= signals
;
386 TP_printk("%s remote: %s channel: %s[%u/%u] signals: %#x",
387 __entry
->tx
? "tx" : "rx",
395 #define trace_qcom_glink_cmd_signal_tx(...) trace_qcom_glink_cmd_signal(__VA_ARGS__, true)
396 #define trace_qcom_glink_cmd_signal_rx(...) trace_qcom_glink_cmd_signal(__VA_ARGS__, false)
400 #undef TRACE_INCLUDE_PATH
401 #define TRACE_INCLUDE_PATH .
403 #undef TRACE_INCLUDE_FILE
404 #define TRACE_INCLUDE_FILE qcom_glink_trace
406 #include <trace/define_trace.h>