diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-devtrace.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-devtrace.h | 141 |
1 files changed, 72 insertions, 69 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h index 96e62338cec0..06203d6a1d86 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h | |||
@@ -41,130 +41,134 @@ static inline void trace_ ## name(proto) {} | |||
41 | static inline void trace_ ## name(proto) {} | 41 | static inline void trace_ ## name(proto) {} |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #define PRIV_ENTRY __field(void *, priv) | 44 | #define DEV_ENTRY __string(dev, dev_name(dev)) |
45 | #define PRIV_ASSIGN __entry->priv = priv | 45 | #define DEV_ASSIGN __assign_str(dev, dev_name(dev)) |
46 | 46 | ||
47 | #undef TRACE_SYSTEM | 47 | #undef TRACE_SYSTEM |
48 | #define TRACE_SYSTEM iwlwifi_io | 48 | #define TRACE_SYSTEM iwlwifi_io |
49 | 49 | ||
50 | TRACE_EVENT(iwlwifi_dev_ioread32, | 50 | TRACE_EVENT(iwlwifi_dev_ioread32, |
51 | TP_PROTO(void *priv, u32 offs, u32 val), | 51 | TP_PROTO(const struct device *dev, u32 offs, u32 val), |
52 | TP_ARGS(priv, offs, val), | 52 | TP_ARGS(dev, offs, val), |
53 | TP_STRUCT__entry( | 53 | TP_STRUCT__entry( |
54 | PRIV_ENTRY | 54 | DEV_ENTRY |
55 | __field(u32, offs) | 55 | __field(u32, offs) |
56 | __field(u32, val) | 56 | __field(u32, val) |
57 | ), | 57 | ), |
58 | TP_fast_assign( | 58 | TP_fast_assign( |
59 | PRIV_ASSIGN; | 59 | DEV_ASSIGN; |
60 | __entry->offs = offs; | 60 | __entry->offs = offs; |
61 | __entry->val = val; | 61 | __entry->val = val; |
62 | ), | 62 | ), |
63 | TP_printk("[%p] read io[%#x] = %#x", __entry->priv, __entry->offs, __entry->val) | 63 | TP_printk("[%s] read io[%#x] = %#x", |
64 | __get_str(dev), __entry->offs, __entry->val) | ||
64 | ); | 65 | ); |
65 | 66 | ||
66 | TRACE_EVENT(iwlwifi_dev_iowrite8, | 67 | TRACE_EVENT(iwlwifi_dev_iowrite8, |
67 | TP_PROTO(void *priv, u32 offs, u8 val), | 68 | TP_PROTO(const struct device *dev, u32 offs, u8 val), |
68 | TP_ARGS(priv, offs, val), | 69 | TP_ARGS(dev, offs, val), |
69 | TP_STRUCT__entry( | 70 | TP_STRUCT__entry( |
70 | PRIV_ENTRY | 71 | DEV_ENTRY |
71 | __field(u32, offs) | 72 | __field(u32, offs) |
72 | __field(u8, val) | 73 | __field(u8, val) |
73 | ), | 74 | ), |
74 | TP_fast_assign( | 75 | TP_fast_assign( |
75 | PRIV_ASSIGN; | 76 | DEV_ASSIGN; |
76 | __entry->offs = offs; | 77 | __entry->offs = offs; |
77 | __entry->val = val; | 78 | __entry->val = val; |
78 | ), | 79 | ), |
79 | TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val) | 80 | TP_printk("[%s] write io[%#x] = %#x)", |
81 | __get_str(dev), __entry->offs, __entry->val) | ||
80 | ); | 82 | ); |
81 | 83 | ||
82 | TRACE_EVENT(iwlwifi_dev_iowrite32, | 84 | TRACE_EVENT(iwlwifi_dev_iowrite32, |
83 | TP_PROTO(void *priv, u32 offs, u32 val), | 85 | TP_PROTO(const struct device *dev, u32 offs, u32 val), |
84 | TP_ARGS(priv, offs, val), | 86 | TP_ARGS(dev, offs, val), |
85 | TP_STRUCT__entry( | 87 | TP_STRUCT__entry( |
86 | PRIV_ENTRY | 88 | DEV_ENTRY |
87 | __field(u32, offs) | 89 | __field(u32, offs) |
88 | __field(u32, val) | 90 | __field(u32, val) |
89 | ), | 91 | ), |
90 | TP_fast_assign( | 92 | TP_fast_assign( |
91 | PRIV_ASSIGN; | 93 | DEV_ASSIGN; |
92 | __entry->offs = offs; | 94 | __entry->offs = offs; |
93 | __entry->val = val; | 95 | __entry->val = val; |
94 | ), | 96 | ), |
95 | TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val) | 97 | TP_printk("[%s] write io[%#x] = %#x)", |
98 | __get_str(dev), __entry->offs, __entry->val) | ||
96 | ); | 99 | ); |
97 | 100 | ||
98 | TRACE_EVENT(iwlwifi_dev_irq, | 101 | TRACE_EVENT(iwlwifi_dev_irq, |
99 | TP_PROTO(void *priv), | 102 | TP_PROTO(const struct device *dev), |
100 | TP_ARGS(priv), | 103 | TP_ARGS(dev), |
101 | TP_STRUCT__entry( | 104 | TP_STRUCT__entry( |
102 | PRIV_ENTRY | 105 | DEV_ENTRY |
103 | ), | 106 | ), |
104 | TP_fast_assign( | 107 | TP_fast_assign( |
105 | PRIV_ASSIGN; | 108 | DEV_ASSIGN; |
106 | ), | 109 | ), |
107 | /* TP_printk("") doesn't compile */ | 110 | /* TP_printk("") doesn't compile */ |
108 | TP_printk("%d", 0) | 111 | TP_printk("%d", 0) |
109 | ); | 112 | ); |
110 | 113 | ||
111 | TRACE_EVENT(iwlwifi_dev_ict_read, | 114 | TRACE_EVENT(iwlwifi_dev_ict_read, |
112 | TP_PROTO(void *priv, u32 index, u32 value), | 115 | TP_PROTO(const struct device *dev, u32 index, u32 value), |
113 | TP_ARGS(priv, index, value), | 116 | TP_ARGS(dev, index, value), |
114 | TP_STRUCT__entry( | 117 | TP_STRUCT__entry( |
115 | PRIV_ENTRY | 118 | DEV_ENTRY |
116 | __field(u32, index) | 119 | __field(u32, index) |
117 | __field(u32, value) | 120 | __field(u32, value) |
118 | ), | 121 | ), |
119 | TP_fast_assign( | 122 | TP_fast_assign( |
120 | PRIV_ASSIGN; | 123 | DEV_ASSIGN; |
121 | __entry->index = index; | 124 | __entry->index = index; |
122 | __entry->value = value; | 125 | __entry->value = value; |
123 | ), | 126 | ), |
124 | TP_printk("read ict[%d] = %#.8x", __entry->index, __entry->value) | 127 | TP_printk("[%s] read ict[%d] = %#.8x", |
128 | __get_str(dev), __entry->index, __entry->value) | ||
125 | ); | 129 | ); |
126 | 130 | ||
127 | #undef TRACE_SYSTEM | 131 | #undef TRACE_SYSTEM |
128 | #define TRACE_SYSTEM iwlwifi_ucode | 132 | #define TRACE_SYSTEM iwlwifi_ucode |
129 | 133 | ||
130 | TRACE_EVENT(iwlwifi_dev_ucode_cont_event, | 134 | TRACE_EVENT(iwlwifi_dev_ucode_cont_event, |
131 | TP_PROTO(void *priv, u32 time, u32 data, u32 ev), | 135 | TP_PROTO(const struct device *dev, u32 time, u32 data, u32 ev), |
132 | TP_ARGS(priv, time, data, ev), | 136 | TP_ARGS(dev, time, data, ev), |
133 | TP_STRUCT__entry( | 137 | TP_STRUCT__entry( |
134 | PRIV_ENTRY | 138 | DEV_ENTRY |
135 | 139 | ||
136 | __field(u32, time) | 140 | __field(u32, time) |
137 | __field(u32, data) | 141 | __field(u32, data) |
138 | __field(u32, ev) | 142 | __field(u32, ev) |
139 | ), | 143 | ), |
140 | TP_fast_assign( | 144 | TP_fast_assign( |
141 | PRIV_ASSIGN; | 145 | DEV_ASSIGN; |
142 | __entry->time = time; | 146 | __entry->time = time; |
143 | __entry->data = data; | 147 | __entry->data = data; |
144 | __entry->ev = ev; | 148 | __entry->ev = ev; |
145 | ), | 149 | ), |
146 | TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u", | 150 | TP_printk("[%s] EVT_LOGT:%010u:0x%08x:%04u", |
147 | __entry->priv, __entry->time, __entry->data, __entry->ev) | 151 | __get_str(dev), __entry->time, __entry->data, __entry->ev) |
148 | ); | 152 | ); |
149 | 153 | ||
150 | TRACE_EVENT(iwlwifi_dev_ucode_wrap_event, | 154 | TRACE_EVENT(iwlwifi_dev_ucode_wrap_event, |
151 | TP_PROTO(void *priv, u32 wraps, u32 n_entry, u32 p_entry), | 155 | TP_PROTO(const struct device *dev, u32 wraps, u32 n_entry, u32 p_entry), |
152 | TP_ARGS(priv, wraps, n_entry, p_entry), | 156 | TP_ARGS(dev, wraps, n_entry, p_entry), |
153 | TP_STRUCT__entry( | 157 | TP_STRUCT__entry( |
154 | PRIV_ENTRY | 158 | DEV_ENTRY |
155 | 159 | ||
156 | __field(u32, wraps) | 160 | __field(u32, wraps) |
157 | __field(u32, n_entry) | 161 | __field(u32, n_entry) |
158 | __field(u32, p_entry) | 162 | __field(u32, p_entry) |
159 | ), | 163 | ), |
160 | TP_fast_assign( | 164 | TP_fast_assign( |
161 | PRIV_ASSIGN; | 165 | DEV_ASSIGN; |
162 | __entry->wraps = wraps; | 166 | __entry->wraps = wraps; |
163 | __entry->n_entry = n_entry; | 167 | __entry->n_entry = n_entry; |
164 | __entry->p_entry = p_entry; | 168 | __entry->p_entry = p_entry; |
165 | ), | 169 | ), |
166 | TP_printk("[%p] wraps=#%02d n=0x%X p=0x%X", | 170 | TP_printk("[%s] wraps=#%02d n=0x%X p=0x%X", |
167 | __entry->priv, __entry->wraps, __entry->n_entry, | 171 | __get_str(dev), __entry->wraps, __entry->n_entry, |
168 | __entry->p_entry) | 172 | __entry->p_entry) |
169 | ); | 173 | ); |
170 | 174 | ||
@@ -232,52 +236,52 @@ TRACE_EVENT(iwlwifi_dbg, | |||
232 | #define TRACE_SYSTEM iwlwifi | 236 | #define TRACE_SYSTEM iwlwifi |
233 | 237 | ||
234 | TRACE_EVENT(iwlwifi_dev_hcmd, | 238 | TRACE_EVENT(iwlwifi_dev_hcmd, |
235 | TP_PROTO(void *priv, u32 flags, | 239 | TP_PROTO(const struct device *dev, u32 flags, |
236 | const void *hcmd0, size_t len0, | 240 | const void *hcmd0, size_t len0, |
237 | const void *hcmd1, size_t len1, | 241 | const void *hcmd1, size_t len1, |
238 | const void *hcmd2, size_t len2), | 242 | const void *hcmd2, size_t len2), |
239 | TP_ARGS(priv, flags, hcmd0, len0, hcmd1, len1, hcmd2, len2), | 243 | TP_ARGS(dev, flags, hcmd0, len0, hcmd1, len1, hcmd2, len2), |
240 | TP_STRUCT__entry( | 244 | TP_STRUCT__entry( |
241 | PRIV_ENTRY | 245 | DEV_ENTRY |
242 | __dynamic_array(u8, hcmd0, len0) | 246 | __dynamic_array(u8, hcmd0, len0) |
243 | __dynamic_array(u8, hcmd1, len1) | 247 | __dynamic_array(u8, hcmd1, len1) |
244 | __dynamic_array(u8, hcmd2, len2) | 248 | __dynamic_array(u8, hcmd2, len2) |
245 | __field(u32, flags) | 249 | __field(u32, flags) |
246 | ), | 250 | ), |
247 | TP_fast_assign( | 251 | TP_fast_assign( |
248 | PRIV_ASSIGN; | 252 | DEV_ASSIGN; |
249 | memcpy(__get_dynamic_array(hcmd0), hcmd0, len0); | 253 | memcpy(__get_dynamic_array(hcmd0), hcmd0, len0); |
250 | memcpy(__get_dynamic_array(hcmd1), hcmd1, len1); | 254 | memcpy(__get_dynamic_array(hcmd1), hcmd1, len1); |
251 | memcpy(__get_dynamic_array(hcmd2), hcmd2, len2); | 255 | memcpy(__get_dynamic_array(hcmd2), hcmd2, len2); |
252 | __entry->flags = flags; | 256 | __entry->flags = flags; |
253 | ), | 257 | ), |
254 | TP_printk("[%p] hcmd %#.2x (%ssync)", | 258 | TP_printk("[%s] hcmd %#.2x (%ssync)", |
255 | __entry->priv, ((u8 *)__get_dynamic_array(hcmd0))[0], | 259 | __get_str(dev), ((u8 *)__get_dynamic_array(hcmd0))[0], |
256 | __entry->flags & CMD_ASYNC ? "a" : "") | 260 | __entry->flags & CMD_ASYNC ? "a" : "") |
257 | ); | 261 | ); |
258 | 262 | ||
259 | TRACE_EVENT(iwlwifi_dev_rx, | 263 | TRACE_EVENT(iwlwifi_dev_rx, |
260 | TP_PROTO(void *priv, void *rxbuf, size_t len), | 264 | TP_PROTO(const struct device *dev, void *rxbuf, size_t len), |
261 | TP_ARGS(priv, rxbuf, len), | 265 | TP_ARGS(dev, rxbuf, len), |
262 | TP_STRUCT__entry( | 266 | TP_STRUCT__entry( |
263 | PRIV_ENTRY | 267 | DEV_ENTRY |
264 | __dynamic_array(u8, rxbuf, len) | 268 | __dynamic_array(u8, rxbuf, len) |
265 | ), | 269 | ), |
266 | TP_fast_assign( | 270 | TP_fast_assign( |
267 | PRIV_ASSIGN; | 271 | DEV_ASSIGN; |
268 | memcpy(__get_dynamic_array(rxbuf), rxbuf, len); | 272 | memcpy(__get_dynamic_array(rxbuf), rxbuf, len); |
269 | ), | 273 | ), |
270 | TP_printk("[%p] RX cmd %#.2x", | 274 | TP_printk("[%s] RX cmd %#.2x", |
271 | __entry->priv, ((u8 *)__get_dynamic_array(rxbuf))[4]) | 275 | __get_str(dev), ((u8 *)__get_dynamic_array(rxbuf))[4]) |
272 | ); | 276 | ); |
273 | 277 | ||
274 | TRACE_EVENT(iwlwifi_dev_tx, | 278 | TRACE_EVENT(iwlwifi_dev_tx, |
275 | TP_PROTO(void *priv, void *tfd, size_t tfdlen, | 279 | TP_PROTO(const struct device *dev, void *tfd, size_t tfdlen, |
276 | void *buf0, size_t buf0_len, | 280 | void *buf0, size_t buf0_len, |
277 | void *buf1, size_t buf1_len), | 281 | void *buf1, size_t buf1_len), |
278 | TP_ARGS(priv, tfd, tfdlen, buf0, buf0_len, buf1, buf1_len), | 282 | TP_ARGS(dev, tfd, tfdlen, buf0, buf0_len, buf1, buf1_len), |
279 | TP_STRUCT__entry( | 283 | TP_STRUCT__entry( |
280 | PRIV_ENTRY | 284 | DEV_ENTRY |
281 | 285 | ||
282 | __field(size_t, framelen) | 286 | __field(size_t, framelen) |
283 | __dynamic_array(u8, tfd, tfdlen) | 287 | __dynamic_array(u8, tfd, tfdlen) |
@@ -291,29 +295,28 @@ TRACE_EVENT(iwlwifi_dev_tx, | |||
291 | __dynamic_array(u8, buf1, buf1_len) | 295 | __dynamic_array(u8, buf1, buf1_len) |
292 | ), | 296 | ), |
293 | TP_fast_assign( | 297 | TP_fast_assign( |
294 | PRIV_ASSIGN; | 298 | DEV_ASSIGN; |
295 | __entry->framelen = buf0_len + buf1_len; | 299 | __entry->framelen = buf0_len + buf1_len; |
296 | memcpy(__get_dynamic_array(tfd), tfd, tfdlen); | 300 | memcpy(__get_dynamic_array(tfd), tfd, tfdlen); |
297 | memcpy(__get_dynamic_array(buf0), buf0, buf0_len); | 301 | memcpy(__get_dynamic_array(buf0), buf0, buf0_len); |
298 | memcpy(__get_dynamic_array(buf1), buf1, buf1_len); | 302 | memcpy(__get_dynamic_array(buf1), buf1, buf1_len); |
299 | ), | 303 | ), |
300 | TP_printk("[%p] TX %.2x (%zu bytes)", | 304 | TP_printk("[%s] TX %.2x (%zu bytes)", |
301 | __entry->priv, | 305 | __get_str(dev), ((u8 *)__get_dynamic_array(buf0))[0], |
302 | ((u8 *)__get_dynamic_array(buf0))[0], | ||
303 | __entry->framelen) | 306 | __entry->framelen) |
304 | ); | 307 | ); |
305 | 308 | ||
306 | TRACE_EVENT(iwlwifi_dev_ucode_error, | 309 | TRACE_EVENT(iwlwifi_dev_ucode_error, |
307 | TP_PROTO(void *priv, u32 desc, u32 tsf_low, | 310 | TP_PROTO(const struct device *dev, u32 desc, u32 tsf_low, |
308 | u32 data1, u32 data2, u32 line, u32 blink1, | 311 | u32 data1, u32 data2, u32 line, u32 blink1, |
309 | u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time, | 312 | u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time, |
310 | u32 gp1, u32 gp2, u32 gp3, u32 ucode_ver, u32 hw_ver, | 313 | u32 gp1, u32 gp2, u32 gp3, u32 ucode_ver, u32 hw_ver, |
311 | u32 brd_ver), | 314 | u32 brd_ver), |
312 | TP_ARGS(priv, desc, tsf_low, data1, data2, line, | 315 | TP_ARGS(dev, desc, tsf_low, data1, data2, line, |
313 | blink1, blink2, ilink1, ilink2, bcon_time, gp1, gp2, | 316 | blink1, blink2, ilink1, ilink2, bcon_time, gp1, gp2, |
314 | gp3, ucode_ver, hw_ver, brd_ver), | 317 | gp3, ucode_ver, hw_ver, brd_ver), |
315 | TP_STRUCT__entry( | 318 | TP_STRUCT__entry( |
316 | PRIV_ENTRY | 319 | DEV_ENTRY |
317 | __field(u32, desc) | 320 | __field(u32, desc) |
318 | __field(u32, tsf_low) | 321 | __field(u32, tsf_low) |
319 | __field(u32, data1) | 322 | __field(u32, data1) |
@@ -332,7 +335,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
332 | __field(u32, brd_ver) | 335 | __field(u32, brd_ver) |
333 | ), | 336 | ), |
334 | TP_fast_assign( | 337 | TP_fast_assign( |
335 | PRIV_ASSIGN; | 338 | DEV_ASSIGN; |
336 | __entry->desc = desc; | 339 | __entry->desc = desc; |
337 | __entry->tsf_low = tsf_low; | 340 | __entry->tsf_low = tsf_low; |
338 | __entry->data1 = data1; | 341 | __entry->data1 = data1; |
@@ -350,11 +353,11 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
350 | __entry->hw_ver = hw_ver; | 353 | __entry->hw_ver = hw_ver; |
351 | __entry->brd_ver = brd_ver; | 354 | __entry->brd_ver = brd_ver; |
352 | ), | 355 | ), |
353 | TP_printk("[%p] #%02d %010u data 0x%08X 0x%08X line %u, " | 356 | TP_printk("[%s] #%02d %010u data 0x%08X 0x%08X line %u, " |
354 | "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X " | 357 | "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X " |
355 | "bcon_tm %010u gp 0x%08X 0x%08X 0x%08X uCode 0x%08X " | 358 | "bcon_tm %010u gp 0x%08X 0x%08X 0x%08X uCode 0x%08X " |
356 | "hw 0x%08X brd 0x%08X", | 359 | "hw 0x%08X brd 0x%08X", |
357 | __entry->priv, __entry->desc, __entry->tsf_low, | 360 | __get_str(dev), __entry->desc, __entry->tsf_low, |
358 | __entry->data1, | 361 | __entry->data1, |
359 | __entry->data2, __entry->line, __entry->blink1, | 362 | __entry->data2, __entry->line, __entry->blink1, |
360 | __entry->blink2, __entry->ilink1, __entry->ilink2, | 363 | __entry->blink2, __entry->ilink1, __entry->ilink2, |
@@ -364,23 +367,23 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
364 | ); | 367 | ); |
365 | 368 | ||
366 | TRACE_EVENT(iwlwifi_dev_ucode_event, | 369 | TRACE_EVENT(iwlwifi_dev_ucode_event, |
367 | TP_PROTO(void *priv, u32 time, u32 data, u32 ev), | 370 | TP_PROTO(const struct device *dev, u32 time, u32 data, u32 ev), |
368 | TP_ARGS(priv, time, data, ev), | 371 | TP_ARGS(dev, time, data, ev), |
369 | TP_STRUCT__entry( | 372 | TP_STRUCT__entry( |
370 | PRIV_ENTRY | 373 | DEV_ENTRY |
371 | 374 | ||
372 | __field(u32, time) | 375 | __field(u32, time) |
373 | __field(u32, data) | 376 | __field(u32, data) |
374 | __field(u32, ev) | 377 | __field(u32, ev) |
375 | ), | 378 | ), |
376 | TP_fast_assign( | 379 | TP_fast_assign( |
377 | PRIV_ASSIGN; | 380 | DEV_ASSIGN; |
378 | __entry->time = time; | 381 | __entry->time = time; |
379 | __entry->data = data; | 382 | __entry->data = data; |
380 | __entry->ev = ev; | 383 | __entry->ev = ev; |
381 | ), | 384 | ), |
382 | TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u", | 385 | TP_printk("[%s] EVT_LOGT:%010u:0x%08x:%04u", |
383 | __entry->priv, __entry->time, __entry->data, __entry->ev) | 386 | __get_str(dev), __entry->time, __entry->data, __entry->ev) |
384 | ); | 387 | ); |
385 | #endif /* __IWLWIFI_DEVICE_TRACE */ | 388 | #endif /* __IWLWIFI_DEVICE_TRACE */ |
386 | 389 | ||