1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Tracepoints for vfio_ccw driver
4 * Copyright IBM Corp. 2018
6 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
7 * Halil Pasic <pasic@linux.vnet.ibm.com>
13 #define TRACE_SYSTEM vfio_ccw
15 #if !defined(_VFIO_CCW_TRACE_) || defined(TRACE_HEADER_MULTI_READ)
16 #define _VFIO_CCW_TRACE_
18 #include <linux/tracepoint.h>
20 TRACE_EVENT(vfio_ccw_chp_event
,
21 TP_PROTO(struct subchannel_id schid
,
24 TP_ARGS(schid
, mask
, event
),
35 __entry
->cssid
= schid
.cssid
;
36 __entry
->ssid
= schid
.ssid
;
37 __entry
->sch_no
= schid
.sch_no
;
39 __entry
->event
= event
;
42 TP_printk("schid=%x.%x.%04x mask=0x%x event=%d",
50 TRACE_EVENT(vfio_ccw_fsm_async_request
,
51 TP_PROTO(struct subchannel_id schid
,
54 TP_ARGS(schid
, command
, errno
),
65 __entry
->cssid
= schid
.cssid
;
66 __entry
->ssid
= schid
.ssid
;
67 __entry
->sch_no
= schid
.sch_no
;
68 __entry
->command
= command
;
69 __entry
->errno
= errno
;
72 TP_printk("schid=%x.%x.%04x command=0x%x errno=%d",
80 TRACE_EVENT(vfio_ccw_fsm_event
,
81 TP_PROTO(struct subchannel_id schid
, int state
, int event
),
82 TP_ARGS(schid
, state
, event
),
93 __entry
->cssid
= schid
.cssid
;
94 __entry
->ssid
= schid
.ssid
;
95 __entry
->schno
= schid
.sch_no
;
96 __entry
->state
= state
;
97 __entry
->event
= event
;
100 TP_printk("schid=%x.%x.%04x state=%d event=%d",
101 __entry
->cssid
, __entry
->ssid
, __entry
->schno
,
106 TRACE_EVENT(vfio_ccw_fsm_io_request
,
107 TP_PROTO(int fctl
, struct subchannel_id schid
, int errno
, char *errstr
),
108 TP_ARGS(fctl
, schid
, errno
, errstr
),
116 __field(char*, errstr
)
120 __entry
->cssid
= schid
.cssid
;
121 __entry
->ssid
= schid
.ssid
;
122 __entry
->sch_no
= schid
.sch_no
;
123 __entry
->fctl
= fctl
;
124 __entry
->errno
= errno
;
125 __entry
->errstr
= errstr
;
128 TP_printk("schid=%x.%x.%04x fctl=0x%x errno=%d info=%s",
137 #endif /* _VFIO_CCW_TRACE_ */
139 /* This part must be outside protection */
141 #undef TRACE_INCLUDE_PATH
142 #define TRACE_INCLUDE_PATH .
143 #undef TRACE_INCLUDE_FILE
144 #define TRACE_INCLUDE_FILE vfio_ccw_trace
146 #include <trace/define_trace.h>