| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | | - * Tracepoints for vfio_ccw driver |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | +/* Tracepoints for vfio_ccw driver |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Copyright IBM Corp. 2018 |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> |
|---|
| 7 | 7 | * Halil Pasic <pasic@linux.vnet.ibm.com> |
|---|
| 8 | 8 | */ |
|---|
| 9 | + |
|---|
| 10 | +#include "cio.h" |
|---|
| 9 | 11 | |
|---|
| 10 | 12 | #undef TRACE_SYSTEM |
|---|
| 11 | 13 | #define TRACE_SYSTEM vfio_ccw |
|---|
| .. | .. |
|---|
| 15 | 17 | |
|---|
| 16 | 18 | #include <linux/tracepoint.h> |
|---|
| 17 | 19 | |
|---|
| 18 | | -TRACE_EVENT(vfio_ccw_io_fctl, |
|---|
| 20 | +TRACE_EVENT(vfio_ccw_chp_event, |
|---|
| 21 | + TP_PROTO(struct subchannel_id schid, |
|---|
| 22 | + int mask, |
|---|
| 23 | + int event), |
|---|
| 24 | + TP_ARGS(schid, mask, event), |
|---|
| 25 | + |
|---|
| 26 | + TP_STRUCT__entry( |
|---|
| 27 | + __field(u8, cssid) |
|---|
| 28 | + __field(u8, ssid) |
|---|
| 29 | + __field(u16, sch_no) |
|---|
| 30 | + __field(int, mask) |
|---|
| 31 | + __field(int, event) |
|---|
| 32 | + ), |
|---|
| 33 | + |
|---|
| 34 | + TP_fast_assign( |
|---|
| 35 | + __entry->cssid = schid.cssid; |
|---|
| 36 | + __entry->ssid = schid.ssid; |
|---|
| 37 | + __entry->sch_no = schid.sch_no; |
|---|
| 38 | + __entry->mask = mask; |
|---|
| 39 | + __entry->event = event; |
|---|
| 40 | + ), |
|---|
| 41 | + |
|---|
| 42 | + TP_printk("schid=%x.%x.%04x mask=0x%x event=%d", |
|---|
| 43 | + __entry->cssid, |
|---|
| 44 | + __entry->ssid, |
|---|
| 45 | + __entry->sch_no, |
|---|
| 46 | + __entry->mask, |
|---|
| 47 | + __entry->event) |
|---|
| 48 | +); |
|---|
| 49 | + |
|---|
| 50 | +TRACE_EVENT(vfio_ccw_fsm_async_request, |
|---|
| 51 | + TP_PROTO(struct subchannel_id schid, |
|---|
| 52 | + int command, |
|---|
| 53 | + int errno), |
|---|
| 54 | + TP_ARGS(schid, command, errno), |
|---|
| 55 | + |
|---|
| 56 | + TP_STRUCT__entry( |
|---|
| 57 | + __field(u8, cssid) |
|---|
| 58 | + __field(u8, ssid) |
|---|
| 59 | + __field(u16, sch_no) |
|---|
| 60 | + __field(int, command) |
|---|
| 61 | + __field(int, errno) |
|---|
| 62 | + ), |
|---|
| 63 | + |
|---|
| 64 | + TP_fast_assign( |
|---|
| 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; |
|---|
| 70 | + ), |
|---|
| 71 | + |
|---|
| 72 | + TP_printk("schid=%x.%x.%04x command=0x%x errno=%d", |
|---|
| 73 | + __entry->cssid, |
|---|
| 74 | + __entry->ssid, |
|---|
| 75 | + __entry->sch_no, |
|---|
| 76 | + __entry->command, |
|---|
| 77 | + __entry->errno) |
|---|
| 78 | +); |
|---|
| 79 | + |
|---|
| 80 | +TRACE_EVENT(vfio_ccw_fsm_event, |
|---|
| 81 | + TP_PROTO(struct subchannel_id schid, int state, int event), |
|---|
| 82 | + TP_ARGS(schid, state, event), |
|---|
| 83 | + |
|---|
| 84 | + TP_STRUCT__entry( |
|---|
| 85 | + __field(u8, cssid) |
|---|
| 86 | + __field(u8, ssid) |
|---|
| 87 | + __field(u16, schno) |
|---|
| 88 | + __field(int, state) |
|---|
| 89 | + __field(int, event) |
|---|
| 90 | + ), |
|---|
| 91 | + |
|---|
| 92 | + TP_fast_assign( |
|---|
| 93 | + __entry->cssid = schid.cssid; |
|---|
| 94 | + __entry->ssid = schid.ssid; |
|---|
| 95 | + __entry->schno = schid.sch_no; |
|---|
| 96 | + __entry->state = state; |
|---|
| 97 | + __entry->event = event; |
|---|
| 98 | + ), |
|---|
| 99 | + |
|---|
| 100 | + TP_printk("schid=%x.%x.%04x state=%d event=%d", |
|---|
| 101 | + __entry->cssid, __entry->ssid, __entry->schno, |
|---|
| 102 | + __entry->state, |
|---|
| 103 | + __entry->event) |
|---|
| 104 | +); |
|---|
| 105 | + |
|---|
| 106 | +TRACE_EVENT(vfio_ccw_fsm_io_request, |
|---|
| 19 | 107 | TP_PROTO(int fctl, struct subchannel_id schid, int errno, char *errstr), |
|---|
| 20 | 108 | TP_ARGS(fctl, schid, errno, errstr), |
|---|
| 21 | 109 | |
|---|
| 22 | 110 | TP_STRUCT__entry( |
|---|
| 111 | + __field(u8, cssid) |
|---|
| 112 | + __field(u8, ssid) |
|---|
| 113 | + __field(u16, sch_no) |
|---|
| 23 | 114 | __field(int, fctl) |
|---|
| 24 | | - __field_struct(struct subchannel_id, schid) |
|---|
| 25 | 115 | __field(int, errno) |
|---|
| 26 | 116 | __field(char*, errstr) |
|---|
| 27 | 117 | ), |
|---|
| 28 | 118 | |
|---|
| 29 | 119 | TP_fast_assign( |
|---|
| 120 | + __entry->cssid = schid.cssid; |
|---|
| 121 | + __entry->ssid = schid.ssid; |
|---|
| 122 | + __entry->sch_no = schid.sch_no; |
|---|
| 30 | 123 | __entry->fctl = fctl; |
|---|
| 31 | | - __entry->schid = schid; |
|---|
| 32 | 124 | __entry->errno = errno; |
|---|
| 33 | 125 | __entry->errstr = errstr; |
|---|
| 34 | 126 | ), |
|---|
| 35 | 127 | |
|---|
| 36 | | - TP_printk("schid=%x.%x.%04x fctl=%x errno=%d info=%s", |
|---|
| 37 | | - __entry->schid.cssid, |
|---|
| 38 | | - __entry->schid.ssid, |
|---|
| 39 | | - __entry->schid.sch_no, |
|---|
| 128 | + TP_printk("schid=%x.%x.%04x fctl=0x%x errno=%d info=%s", |
|---|
| 129 | + __entry->cssid, |
|---|
| 130 | + __entry->ssid, |
|---|
| 131 | + __entry->sch_no, |
|---|
| 40 | 132 | __entry->fctl, |
|---|
| 41 | 133 | __entry->errno, |
|---|
| 42 | 134 | __entry->errstr) |
|---|