1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Marvell OcteonTx2 RVU Admin Function driver tracepoints 3 * 4 * Copyright (C) 2020 Marvell International Ltd. 5 */ 6 7 #undef TRACE_SYSTEM 8 #define TRACE_SYSTEM rvu 9 10 #if !defined(__RVU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) 11 #define __RVU_TRACE_H 12 13 #include <linux/types.h> 14 #include <linux/tracepoint.h> 15 #include <linux/pci.h> 16 17 TRACE_EVENT(otx2_msg_alloc, 18 TP_PROTO(const struct pci_dev *pdev, u16 id, u64 size), 19 TP_ARGS(pdev, id, size), 20 TP_STRUCT__entry(__string(dev, pci_name(pdev)) 21 __field(u16, id) 22 __field(u64, size) 23 ), 24 TP_fast_assign(__assign_str(dev, pci_name(pdev)) 25 __entry->id = id; 26 __entry->size = size; 27 ), 28 TP_printk("[%s] msg:(0x%x) size:%lld\n", __get_str(dev), 29 __entry->id, __entry->size) 30 ); 31 32 TRACE_EVENT(otx2_msg_send, 33 TP_PROTO(const struct pci_dev *pdev, u16 num_msgs, u64 msg_size), 34 TP_ARGS(pdev, num_msgs, msg_size), 35 TP_STRUCT__entry(__string(dev, pci_name(pdev)) 36 __field(u16, num_msgs) 37 __field(u64, msg_size) 38 ), 39 TP_fast_assign(__assign_str(dev, pci_name(pdev)) 40 __entry->num_msgs = num_msgs; 41 __entry->msg_size = msg_size; 42 ), 43 TP_printk("[%s] sent %d msg(s) of size:%lld\n", __get_str(dev), 44 __entry->num_msgs, __entry->msg_size) 45 ); 46 47 TRACE_EVENT(otx2_msg_check, 48 TP_PROTO(const struct pci_dev *pdev, u16 reqid, u16 rspid, int rc), 49 TP_ARGS(pdev, reqid, rspid, rc), 50 TP_STRUCT__entry(__string(dev, pci_name(pdev)) 51 __field(u16, reqid) 52 __field(u16, rspid) 53 __field(int, rc) 54 ), 55 TP_fast_assign(__assign_str(dev, pci_name(pdev)) 56 __entry->reqid = reqid; 57 __entry->rspid = rspid; 58 __entry->rc = rc; 59 ), 60 TP_printk("[%s] req->id:0x%x rsp->id:0x%x resp_code:%d\n", 61 __get_str(dev), __entry->reqid, 62 __entry->rspid, __entry->rc) 63 ); 64 65 TRACE_EVENT(otx2_msg_interrupt, 66 TP_PROTO(const struct pci_dev *pdev, const char *msg, u64 intr), 67 TP_ARGS(pdev, msg, intr), 68 TP_STRUCT__entry(__string(dev, pci_name(pdev)) 69 __string(str, msg) 70 __field(u64, intr) 71 ), 72 TP_fast_assign(__assign_str(dev, pci_name(pdev)) 73 __assign_str(str, msg) 74 __entry->intr = intr; 75 ), 76 TP_printk("[%s] mbox interrupt %s (0x%llx)\n", __get_str(dev), 77 __get_str(str), __entry->intr) 78 ); 79 80 TRACE_EVENT(otx2_msg_process, 81 TP_PROTO(const struct pci_dev *pdev, u16 id, int err), 82 TP_ARGS(pdev, id, err), 83 TP_STRUCT__entry(__string(dev, pci_name(pdev)) 84 __field(u16, id) 85 __field(int, err) 86 ), 87 TP_fast_assign(__assign_str(dev, pci_name(pdev)) 88 __entry->id = id; 89 __entry->err = err; 90 ), 91 TP_printk("[%s] msg:(0x%x) error:%d\n", __get_str(dev), 92 __entry->id, __entry->err) 93 ); 94 95 #endif /* __RVU_TRACE_H */ 96 97 #undef TRACE_INCLUDE_PATH 98 #define TRACE_INCLUDE_PATH . 99 100 #undef TRACE_INCLUDE_FILE 101 #define TRACE_INCLUDE_FILE rvu_trace 102 103 #include <trace/define_trace.h> 104