1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright(c) 2015 - 2018 Intel Corporation.
6 #if !defined(__HFI1_TRACE_RX_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __HFI1_TRACE_RX_H
9 #include <linux/tracepoint.h>
10 #include <linux/trace_seq.h>
14 #define tidtype_name(type) { PT_##type, #type }
15 #define show_tidtype(type) \
16 __print_symbolic(type, \
17 tidtype_name(EXPECTED), \
18 tidtype_name(EAGER), \
19 tidtype_name(INVALID)) \
22 #define TRACE_SYSTEM hfi1_rx
24 TRACE_EVENT(hfi1_rcvhdr
,
25 TP_PROTO(struct hfi1_packet
*packet
),
27 TP_STRUCT__entry(DD_DEV_ENTRY(packet
->rcd
->dd
)
36 TP_fast_assign(DD_DEV_ASSIGN(packet
->rcd
->dd
);
37 __entry
->eflags
= rhf_err_flags(packet
->rhf
);
38 __entry
->ctxt
= packet
->rcd
->ctxt
;
39 __entry
->etype
= packet
->etype
;
40 __entry
->hlen
= packet
->hlen
;
41 __entry
->tlen
= packet
->tlen
;
42 __entry
->updegr
= packet
->updegr
;
43 __entry
->etail
= rhf_egr_index(packet
->rhf
);
46 "[%s] ctxt %d eflags 0x%llx etype %d,%s hlen %d tlen %d updegr %d etail %d",
50 __entry
->etype
, show_packettype(__entry
->etype
),
58 TRACE_EVENT(hfi1_receive_interrupt
,
59 TP_PROTO(struct hfi1_devdata
*dd
, struct hfi1_ctxtdata
*rcd
),
61 TP_STRUCT__entry(DD_DEV_ENTRY(dd
)
63 __field(u8
, slow_path
)
64 __field(u8
, dma_rtail
)
66 TP_fast_assign(DD_DEV_ASSIGN(dd
);
67 __entry
->ctxt
= rcd
->ctxt
;
68 __entry
->slow_path
= hfi1_is_slowpath(rcd
);
69 __entry
->dma_rtail
= get_dma_rtail_setting(rcd
);
71 TP_printk("[%s] ctxt %d SlowPath: %d DmaRtail: %d",
79 TRACE_EVENT(hfi1_mmu_invalidate
,
80 TP_PROTO(unsigned int ctxt
, u16 subctxt
, const char *type
,
81 unsigned long start
, unsigned long end
),
82 TP_ARGS(ctxt
, subctxt
, type
, start
, end
),
84 __field(unsigned int, ctxt
)
87 __field(unsigned long, start
)
88 __field(unsigned long, end
)
92 __entry
->subctxt
= subctxt
;
94 __entry
->start
= start
;
97 TP_printk("[%3u:%02u] MMU Invalidate (%s) 0x%lx - 0x%lx",
106 #endif /* __HFI1_TRACE_RX_H */
108 #undef TRACE_INCLUDE_PATH
109 #undef TRACE_INCLUDE_FILE
110 #define TRACE_INCLUDE_PATH .
111 #define TRACE_INCLUDE_FILE trace_rx
112 #include <trace/define_trace.h>