2019-12-25 20:20:58 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Tracepoints for vfio_ccw driver
|
2018-05-23 10:56:45 +08:00
|
|
|
*
|
|
|
|
* Copyright IBM Corp. 2018
|
|
|
|
*
|
|
|
|
* Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
|
|
|
|
* Halil Pasic <pasic@linux.vnet.ibm.com>
|
|
|
|
*/
|
|
|
|
|
2019-10-16 22:20:37 +08:00
|
|
|
#include "cio.h"
|
|
|
|
|
2018-05-23 10:56:45 +08:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM vfio_ccw
|
|
|
|
|
|
|
|
#if !defined(_VFIO_CCW_TRACE_) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _VFIO_CCW_TRACE_
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
2019-10-16 22:20:39 +08:00
|
|
|
TRACE_EVENT(vfio_ccw_fsm_async_request,
|
|
|
|
TP_PROTO(struct subchannel_id schid,
|
|
|
|
int command,
|
|
|
|
int errno),
|
|
|
|
TP_ARGS(schid, command, errno),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(u8, cssid)
|
|
|
|
__field(u8, ssid)
|
|
|
|
__field(u16, sch_no)
|
|
|
|
__field(int, command)
|
|
|
|
__field(int, errno)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->cssid = schid.cssid;
|
|
|
|
__entry->ssid = schid.ssid;
|
|
|
|
__entry->sch_no = schid.sch_no;
|
|
|
|
__entry->command = command;
|
|
|
|
__entry->errno = errno;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("schid=%x.%x.%04x command=0x%x errno=%d",
|
|
|
|
__entry->cssid,
|
|
|
|
__entry->ssid,
|
|
|
|
__entry->sch_no,
|
|
|
|
__entry->command,
|
|
|
|
__entry->errno)
|
|
|
|
);
|
|
|
|
|
2019-10-16 22:20:38 +08:00
|
|
|
TRACE_EVENT(vfio_ccw_fsm_event,
|
|
|
|
TP_PROTO(struct subchannel_id schid, int state, int event),
|
|
|
|
TP_ARGS(schid, state, event),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(u8, cssid)
|
|
|
|
__field(u8, ssid)
|
|
|
|
__field(u16, schno)
|
|
|
|
__field(int, state)
|
|
|
|
__field(int, event)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->cssid = schid.cssid;
|
|
|
|
__entry->ssid = schid.ssid;
|
|
|
|
__entry->schno = schid.sch_no;
|
|
|
|
__entry->state = state;
|
|
|
|
__entry->event = event;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("schid=%x.%x.%04x state=%d event=%d",
|
|
|
|
__entry->cssid, __entry->ssid, __entry->schno,
|
|
|
|
__entry->state,
|
|
|
|
__entry->event)
|
|
|
|
);
|
|
|
|
|
2019-10-16 22:20:40 +08:00
|
|
|
TRACE_EVENT(vfio_ccw_fsm_io_request,
|
2018-05-23 10:56:45 +08:00
|
|
|
TP_PROTO(int fctl, struct subchannel_id schid, int errno, char *errstr),
|
|
|
|
TP_ARGS(fctl, schid, errno, errstr),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2019-10-16 22:20:40 +08:00
|
|
|
__field(u8, cssid)
|
|
|
|
__field(u8, ssid)
|
|
|
|
__field(u16, sch_no)
|
2018-05-23 10:56:45 +08:00
|
|
|
__field(int, fctl)
|
|
|
|
__field(int, errno)
|
|
|
|
__field(char*, errstr)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2019-10-16 22:20:40 +08:00
|
|
|
__entry->cssid = schid.cssid;
|
|
|
|
__entry->ssid = schid.ssid;
|
|
|
|
__entry->sch_no = schid.sch_no;
|
2018-05-23 10:56:45 +08:00
|
|
|
__entry->fctl = fctl;
|
|
|
|
__entry->errno = errno;
|
|
|
|
__entry->errstr = errstr;
|
|
|
|
),
|
|
|
|
|
2019-10-16 22:20:40 +08:00
|
|
|
TP_printk("schid=%x.%x.%04x fctl=0x%x errno=%d info=%s",
|
|
|
|
__entry->cssid,
|
|
|
|
__entry->ssid,
|
|
|
|
__entry->sch_no,
|
2018-05-23 10:56:45 +08:00
|
|
|
__entry->fctl,
|
|
|
|
__entry->errno,
|
|
|
|
__entry->errstr)
|
|
|
|
);
|
|
|
|
|
|
|
|
#endif /* _VFIO_CCW_TRACE_ */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
|
|
|
|
#undef TRACE_INCLUDE_PATH
|
|
|
|
#define TRACE_INCLUDE_PATH .
|
|
|
|
#undef TRACE_INCLUDE_FILE
|
|
|
|
#define TRACE_INCLUDE_FILE vfio_ccw_trace
|
|
|
|
|
|
|
|
#include <trace/define_trace.h>
|