13cd90214SHalil Pasic /* SPDX-License-Identifier: GPL-2.0 23cd90214SHalil Pasic * Tracepoints for vfio_ccw driver 33cd90214SHalil Pasic * 43cd90214SHalil Pasic * Copyright IBM Corp. 2018 53cd90214SHalil Pasic * 63cd90214SHalil Pasic * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> 73cd90214SHalil Pasic * Halil Pasic <pasic@linux.vnet.ibm.com> 83cd90214SHalil Pasic */ 93cd90214SHalil Pasic 107af52ccaSEric Farman #include "cio.h" 117af52ccaSEric Farman 123cd90214SHalil Pasic #undef TRACE_SYSTEM 133cd90214SHalil Pasic #define TRACE_SYSTEM vfio_ccw 143cd90214SHalil Pasic 153cd90214SHalil Pasic #if !defined(_VFIO_CCW_TRACE_) || defined(TRACE_HEADER_MULTI_READ) 163cd90214SHalil Pasic #define _VFIO_CCW_TRACE_ 173cd90214SHalil Pasic 183cd90214SHalil Pasic #include <linux/tracepoint.h> 193cd90214SHalil Pasic 203cd90214SHalil Pasic TRACE_EVENT(vfio_ccw_io_fctl, 213cd90214SHalil Pasic TP_PROTO(int fctl, struct subchannel_id schid, int errno, char *errstr), 223cd90214SHalil Pasic TP_ARGS(fctl, schid, errno, errstr), 233cd90214SHalil Pasic 243cd90214SHalil Pasic TP_STRUCT__entry( 253cd90214SHalil Pasic __field(int, fctl) 263cd90214SHalil Pasic __field_struct(struct subchannel_id, schid) 273cd90214SHalil Pasic __field(int, errno) 283cd90214SHalil Pasic __field(char*, errstr) 293cd90214SHalil Pasic ), 303cd90214SHalil Pasic 313cd90214SHalil Pasic TP_fast_assign( 323cd90214SHalil Pasic __entry->fctl = fctl; 333cd90214SHalil Pasic __entry->schid = schid; 343cd90214SHalil Pasic __entry->errno = errno; 353cd90214SHalil Pasic __entry->errstr = errstr; 363cd90214SHalil Pasic ), 373cd90214SHalil Pasic 383cd90214SHalil Pasic TP_printk("schid=%x.%x.%04x fctl=%x errno=%d info=%s", 393cd90214SHalil Pasic __entry->schid.cssid, 403cd90214SHalil Pasic __entry->schid.ssid, 413cd90214SHalil Pasic __entry->schid.sch_no, 423cd90214SHalil Pasic __entry->fctl, 433cd90214SHalil Pasic __entry->errno, 443cd90214SHalil Pasic __entry->errstr) 453cd90214SHalil Pasic ); 463cd90214SHalil Pasic 473cd90214SHalil Pasic #endif /* _VFIO_CCW_TRACE_ */ 483cd90214SHalil Pasic 493cd90214SHalil Pasic /* This part must be outside protection */ 503cd90214SHalil Pasic 513cd90214SHalil Pasic #undef TRACE_INCLUDE_PATH 523cd90214SHalil Pasic #define TRACE_INCLUDE_PATH . 533cd90214SHalil Pasic #undef TRACE_INCLUDE_FILE 543cd90214SHalil Pasic #define TRACE_INCLUDE_FILE vfio_ccw_trace 553cd90214SHalil Pasic 563cd90214SHalil Pasic #include <trace/define_trace.h> 57