WIP FPC-III support
[linux/fpc-iii.git] / drivers / infiniband / hw / hfi1 / trace_iowait.h
blob27f4334ece2b6a041ecb6d1f2678ee48e5a1702d
1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2 /*
3 * Copyright(c) 2018 Intel Corporation.
5 */
6 #if !defined(__HFI1_TRACE_IOWAIT_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __HFI1_TRACE_IOWAIT_H
9 #include <linux/tracepoint.h>
10 #include "iowait.h"
11 #include "verbs.h"
13 #undef TRACE_SYSTEM
14 #define TRACE_SYSTEM hfi1_iowait
16 DECLARE_EVENT_CLASS(hfi1_iowait_template,
17 TP_PROTO(struct iowait *wait, u32 flag),
18 TP_ARGS(wait, flag),
19 TP_STRUCT__entry(/* entry */
20 __field(unsigned long, addr)
21 __field(unsigned long, flags)
22 __field(u32, flag)
23 __field(u32, qpn)
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;
31 TP_printk(/* print */
32 "iowait 0x%lx qp %u flags 0x%lx flag 0x%x",
33 __entry->addr,
34 __entry->qpn,
35 __entry->flags,
36 __entry->flag
40 DEFINE_EVENT(hfi1_iowait_template, hfi1_iowait_set,
41 TP_PROTO(struct iowait *wait, u32 flag),
42 TP_ARGS(wait, flag));
44 DEFINE_EVENT(hfi1_iowait_template, hfi1_iowait_clear,
45 TP_PROTO(struct iowait *wait, u32 flag),
46 TP_ARGS(wait, 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>