1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
3 * Copyright(c) 2018 Intel Corporation.
6 #if !defined(__HFI1_TRACE_IOWAIT_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __HFI1_TRACE_IOWAIT_H
9 #include <linux/tracepoint.h>
14 #define TRACE_SYSTEM hfi1_iowait
16 DECLARE_EVENT_CLASS(hfi1_iowait_template
,
17 TP_PROTO(struct iowait
*wait
, u32 flag
),
19 TP_STRUCT__entry(/* entry */
20 __field(unsigned long, addr
)
21 __field(unsigned long, flags
)
25 TP_fast_assign(/* assign */
26 __entry
->addr
= (unsigned long)wait
;
27 __entry
->flags
= wait
->flags
;
28 __entry
->flag
= (1 << flag
);
29 __entry
->qpn
= iowait_to_qp(wait
)->ibqp
.qp_num
;
32 "iowait 0x%lx qp %u flags 0x%lx flag 0x%x",
40 DEFINE_EVENT(hfi1_iowait_template
, hfi1_iowait_set
,
41 TP_PROTO(struct iowait
*wait
, u32 flag
),
44 DEFINE_EVENT(hfi1_iowait_template
, hfi1_iowait_clear
,
45 TP_PROTO(struct iowait
*wait
, u32 flag
),
48 #endif /* __HFI1_TRACE_IOWAIT_H */
50 #undef TRACE_INCLUDE_PATH
51 #undef TRACE_INCLUDE_FILE
52 #define TRACE_INCLUDE_PATH .
53 #define TRACE_INCLUDE_FILE trace_iowait
54 #include <trace/define_trace.h>