.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 and |
---|
6 | | - * only version 2 as published by the Free Software Foundation. |
---|
7 | | - * |
---|
8 | | - * This program is distributed in the hope that it will be useful, |
---|
9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | | - * GNU General Public License for more details. |
---|
12 | 4 | */ |
---|
13 | 5 | |
---|
14 | 6 | #undef TRACE_SYSTEM |
---|
.. | .. |
---|
18 | 10 | #define _TRACE_UFS_H |
---|
19 | 11 | |
---|
20 | 12 | #include <linux/tracepoint.h> |
---|
| 13 | + |
---|
| 14 | +#define str_opcode(opcode) \ |
---|
| 15 | + __print_symbolic(opcode, \ |
---|
| 16 | + { WRITE_16, "WRITE_16" }, \ |
---|
| 17 | + { WRITE_10, "WRITE_10" }, \ |
---|
| 18 | + { READ_16, "READ_16" }, \ |
---|
| 19 | + { READ_10, "READ_10" }, \ |
---|
| 20 | + { SYNCHRONIZE_CACHE, "SYNC" }, \ |
---|
| 21 | + { UNMAP, "UNMAP" }) |
---|
21 | 22 | |
---|
22 | 23 | #define UFS_LINK_STATES \ |
---|
23 | 24 | EM(UIC_LINK_OFF_STATE) \ |
---|
.. | .. |
---|
223 | 224 | TRACE_EVENT(ufshcd_command, |
---|
224 | 225 | TP_PROTO(const char *dev_name, const char *str, unsigned int tag, |
---|
225 | 226 | u32 doorbell, int transfer_len, u32 intr, u64 lba, |
---|
226 | | - u8 opcode), |
---|
| 227 | + u8 opcode, u8 group_id), |
---|
227 | 228 | |
---|
228 | | - TP_ARGS(dev_name, str, tag, doorbell, transfer_len, intr, lba, opcode), |
---|
| 229 | + TP_ARGS(dev_name, str, tag, doorbell, transfer_len, |
---|
| 230 | + intr, lba, opcode, group_id), |
---|
229 | 231 | |
---|
230 | 232 | TP_STRUCT__entry( |
---|
231 | 233 | __string(dev_name, dev_name) |
---|
.. | .. |
---|
236 | 238 | __field(u32, intr) |
---|
237 | 239 | __field(u64, lba) |
---|
238 | 240 | __field(u8, opcode) |
---|
| 241 | + __field(u8, group_id) |
---|
239 | 242 | ), |
---|
240 | 243 | |
---|
241 | 244 | TP_fast_assign( |
---|
.. | .. |
---|
247 | 250 | __entry->intr = intr; |
---|
248 | 251 | __entry->lba = lba; |
---|
249 | 252 | __entry->opcode = opcode; |
---|
| 253 | + __entry->group_id = group_id; |
---|
250 | 254 | ), |
---|
251 | 255 | |
---|
252 | 256 | TP_printk( |
---|
253 | | - "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x", |
---|
| 257 | + "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x", |
---|
254 | 258 | __get_str(str), __get_str(dev_name), __entry->tag, |
---|
255 | 259 | __entry->doorbell, __entry->transfer_len, |
---|
256 | | - __entry->intr, __entry->lba, (u32)__entry->opcode |
---|
| 260 | + __entry->intr, __entry->lba, (u32)__entry->opcode, |
---|
| 261 | + str_opcode(__entry->opcode), (u32)__entry->group_id |
---|
| 262 | + ) |
---|
| 263 | +); |
---|
| 264 | + |
---|
| 265 | +TRACE_EVENT(ufshcd_uic_command, |
---|
| 266 | + TP_PROTO(const char *dev_name, const char *str, u32 cmd, |
---|
| 267 | + u32 arg1, u32 arg2, u32 arg3), |
---|
| 268 | + |
---|
| 269 | + TP_ARGS(dev_name, str, cmd, arg1, arg2, arg3), |
---|
| 270 | + |
---|
| 271 | + TP_STRUCT__entry( |
---|
| 272 | + __string(dev_name, dev_name) |
---|
| 273 | + __string(str, str) |
---|
| 274 | + __field(u32, cmd) |
---|
| 275 | + __field(u32, arg1) |
---|
| 276 | + __field(u32, arg2) |
---|
| 277 | + __field(u32, arg3) |
---|
| 278 | + ), |
---|
| 279 | + |
---|
| 280 | + TP_fast_assign( |
---|
| 281 | + __assign_str(dev_name, dev_name); |
---|
| 282 | + __assign_str(str, str); |
---|
| 283 | + __entry->cmd = cmd; |
---|
| 284 | + __entry->arg1 = arg1; |
---|
| 285 | + __entry->arg2 = arg2; |
---|
| 286 | + __entry->arg3 = arg3; |
---|
| 287 | + ), |
---|
| 288 | + |
---|
| 289 | + TP_printk( |
---|
| 290 | + "%s: %s: cmd: 0x%x, arg1: 0x%x, arg2: 0x%x, arg3: 0x%x", |
---|
| 291 | + __get_str(str), __get_str(dev_name), __entry->cmd, |
---|
| 292 | + __entry->arg1, __entry->arg2, __entry->arg3 |
---|
257 | 293 | ) |
---|
258 | 294 | ); |
---|
259 | 295 | |
---|