1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright(c) 2015, 2016 Intel Corporation.
6 #if !defined(__HFI1_TRACE_MISC_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __HFI1_TRACE_MISC_H
9 #include <linux/tracepoint.h>
10 #include <linux/trace_seq.h>
15 #define TRACE_SYSTEM hfi1_misc
17 TRACE_EVENT(hfi1_interrupt
,
18 TP_PROTO(struct hfi1_devdata
*dd
, const struct is_table
*is_entry
,
20 TP_ARGS(dd
, is_entry
, src
),
21 TP_STRUCT__entry(DD_DEV_ENTRY(dd
)
22 __array(char, buf
, 64)
25 TP_fast_assign(DD_DEV_ASSIGN(dd
);
26 is_entry
->is_name(__entry
->buf
, 64,
27 src
- is_entry
->start
);
30 TP_printk("[%s] source: %s [%d]", __get_str(dev
), __entry
->buf
,
36 TP_PROTO(void __iomem
*addr
, u64 value
),
39 __field(void __iomem
*, addr
)
44 __entry
->value
= value
;
46 TP_printk("addr %p value %llx", __entry
->addr
, __entry
->value
)
50 hfi1_csr_template
, hfi1_write_rcvarray
,
51 TP_PROTO(void __iomem
*addr
, u64 value
),
52 TP_ARGS(addr
, value
));
54 #ifdef CONFIG_FAULT_INJECTION
55 TRACE_EVENT(hfi1_fault_opcode
,
56 TP_PROTO(struct rvt_qp
*qp
, u8 opcode
),
58 TP_STRUCT__entry(DD_DEV_ENTRY(dd_from_ibdev(qp
->ibqp
.device
))
62 TP_fast_assign(DD_DEV_ASSIGN(dd_from_ibdev(qp
->ibqp
.device
));
63 __entry
->qpn
= qp
->ibqp
.qp_num
;
64 __entry
->opcode
= opcode
;
66 TP_printk("[%s] qpn 0x%x opcode 0x%x",
67 __get_str(dev
), __entry
->qpn
, __entry
->opcode
)
70 TRACE_EVENT(hfi1_fault_packet
,
71 TP_PROTO(struct hfi1_packet
*packet
),
73 TP_STRUCT__entry(DD_DEV_ENTRY(packet
->rcd
->ppd
->dd
)
81 TP_fast_assign(DD_DEV_ASSIGN(packet
->rcd
->ppd
->dd
);
82 __entry
->eflags
= rhf_err_flags(packet
->rhf
);
83 __entry
->ctxt
= packet
->rcd
->ctxt
;
84 __entry
->hlen
= packet
->hlen
;
85 __entry
->tlen
= packet
->tlen
;
86 __entry
->updegr
= packet
->updegr
;
87 __entry
->etail
= rhf_egr_index(packet
->rhf
);
90 "[%s] ctxt %d eflags 0x%llx hlen %d tlen %d updegr %d etail %d",
102 #endif /* __HFI1_TRACE_MISC_H */
104 #undef TRACE_INCLUDE_PATH
105 #undef TRACE_INCLUDE_FILE
106 #define TRACE_INCLUDE_PATH .
107 #define TRACE_INCLUDE_FILE trace_misc
108 #include <trace/define_trace.h>