Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Tracepoint header for the s390 Common I/O layer (CIO)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright IBM Corp. 2015
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * Author(s): Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <asm/crw.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <uapi/asm/chpid.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <uapi/asm/schid.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include "cio.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include "orb.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #define TRACE_SYSTEM s390
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #if !defined(_TRACE_S390_CIO_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #define _TRACE_S390_CIO_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) DECLARE_EVENT_CLASS(s390_class_schib,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	TP_PROTO(struct subchannel_id schid, struct schib *schib, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	TP_ARGS(schid, schib, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		__field(u8, cssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 		__field(u8, ssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 		__field(u16, schno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 		__field(u16, devno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 		__field_struct(struct schib, schib)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		__field(u8, pmcw_ena)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 		__field(u8, pmcw_st)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 		__field(u8, pmcw_dnv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		__field(u16, pmcw_dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 		__field(u8, pmcw_lpm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 		__field(u8, pmcw_pnom)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		__field(u8, pmcw_lpum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		__field(u8, pmcw_pim)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		__field(u8, pmcw_pam)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 		__field(u8, pmcw_pom)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 		__field(u64, pmcw_chpid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 		__entry->cssid = schid.cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		__entry->ssid = schid.ssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		__entry->schno = schid.sch_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		__entry->devno = schib->pmcw.dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		__entry->schib = *schib;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		__entry->pmcw_ena = schib->pmcw.ena;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		__entry->pmcw_st = schib->pmcw.ena;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		__entry->pmcw_dnv = schib->pmcw.dnv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		__entry->pmcw_dev = schib->pmcw.dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		__entry->pmcw_lpm = schib->pmcw.lpm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		__entry->pmcw_pnom = schib->pmcw.pnom;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		__entry->pmcw_lpum = schib->pmcw.lpum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		__entry->pmcw_pim = schib->pmcw.pim;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		__entry->pmcw_pam = schib->pmcw.pam;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		__entry->pmcw_pom = schib->pmcw.pom;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		memcpy(&__entry->pmcw_chpid, &schib->pmcw.chpid, 8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	TP_printk("schid=%x.%x.%04x cc=%d ena=%d st=%d dnv=%d dev=%04x "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		  "lpm=0x%02x pnom=0x%02x lpum=0x%02x pim=0x%02x pam=0x%02x "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		  "pom=0x%02x chpids=%016llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		  __entry->cssid, __entry->ssid, __entry->schno, __entry->cc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		  __entry->pmcw_ena, __entry->pmcw_st,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		  __entry->pmcw_dnv, __entry->pmcw_dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		  __entry->pmcw_lpm, __entry->pmcw_pnom,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		  __entry->pmcw_lpum, __entry->pmcw_pim,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		  __entry->pmcw_pam, __entry->pmcw_pom,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		  __entry->pmcw_chpid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)  * s390_cio_stsch -  Store Subchannel instruction (STSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)  * @schib: Subchannel-Information block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) DEFINE_EVENT(s390_class_schib, s390_cio_stsch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	TP_PROTO(struct subchannel_id schid, struct schib *schib, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	TP_ARGS(schid, schib, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)  * s390_cio_msch -  Modify Subchannel instruction (MSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)  * @schib: Subchannel-Information block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) DEFINE_EVENT(s390_class_schib, s390_cio_msch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	TP_PROTO(struct subchannel_id schid, struct schib *schib, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	TP_ARGS(schid, schib, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)  * s390_cio_tsch - Test Subchannel instruction (TSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)  * @irb: Interruption-Response Block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) TRACE_EVENT(s390_cio_tsch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	TP_PROTO(struct subchannel_id schid, struct irb *irb, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	TP_ARGS(schid, irb, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 		__field(u8, cssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		__field(u8, ssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		__field(u16, schno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		__field_struct(struct irb, irb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		__field(u8, scsw_dcc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		__field(u8, scsw_pno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		__field(u8, scsw_fctl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 		__field(u8, scsw_actl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		__field(u8, scsw_stctl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		__field(u8, scsw_dstat)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		__field(u8, scsw_cstat)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		__entry->cssid = schid.cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		__entry->ssid = schid.ssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		__entry->schno = schid.sch_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		__entry->irb = *irb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 		__entry->scsw_dcc = scsw_cc(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		__entry->scsw_pno = scsw_pno(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		__entry->scsw_fctl = scsw_fctl(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		__entry->scsw_actl = scsw_actl(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		__entry->scsw_stctl = scsw_stctl(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		__entry->scsw_dstat = scsw_dstat(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		__entry->scsw_cstat = scsw_cstat(&irb->scsw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	TP_printk("schid=%x.%x.%04x cc=%d dcc=%d pno=%d fctl=0x%x actl=0x%x "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		  "stctl=0x%x dstat=0x%x cstat=0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		  __entry->cssid, __entry->ssid, __entry->schno, __entry->cc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		  __entry->scsw_dcc, __entry->scsw_pno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		  __entry->scsw_fctl, __entry->scsw_actl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		  __entry->scsw_stctl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		  __entry->scsw_dstat, __entry->scsw_cstat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)  * s390_cio_tpi - Test Pending Interruption instruction (TPI) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)  * @addr: Address of the I/O interruption code or %NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) TRACE_EVENT(s390_cio_tpi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	TP_PROTO(struct tpi_info *addr, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	TP_ARGS(addr, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		__field_struct(struct tpi_info, tpi_info)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		__field(u8, cssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		__field(u8, ssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		__field(u16, schno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		__field(u8, adapter_IO)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		__field(u8, isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		__field(u8, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		if (cc != 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 			memset(&__entry->tpi_info, 0, sizeof(struct tpi_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		else if (addr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 			__entry->tpi_info = *addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 			memcpy(&__entry->tpi_info, &S390_lowcore.subchannel_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 			       sizeof(struct tpi_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		__entry->cssid = __entry->tpi_info.schid.cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 		__entry->ssid = __entry->tpi_info.schid.ssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 		__entry->schno = __entry->tpi_info.schid.sch_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		__entry->adapter_IO = __entry->tpi_info.adapter_IO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		__entry->isc = __entry->tpi_info.isc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		__entry->type = __entry->tpi_info.type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	TP_printk("schid=%x.%x.%04x cc=%d a=%d isc=%d type=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		  __entry->cssid, __entry->ssid, __entry->schno, __entry->cc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		  __entry->adapter_IO, __entry->isc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		  __entry->type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)  * s390_cio_ssch - Start Subchannel instruction (SSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)  * @orb: Operation-Request Block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) TRACE_EVENT(s390_cio_ssch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	TP_PROTO(struct subchannel_id schid, union orb *orb, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	TP_ARGS(schid, orb, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		__field(u8, cssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		__field(u8, ssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 		__field(u16, schno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		__field_struct(union orb, orb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 		__entry->cssid = schid.cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 		__entry->ssid = schid.ssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 		__entry->schno = schid.sch_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 		__entry->orb = *orb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	TP_printk("schid=%x.%x.%04x cc=%d", __entry->cssid, __entry->ssid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		  __entry->schno, __entry->cc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) DECLARE_EVENT_CLASS(s390_class_schid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	TP_PROTO(struct subchannel_id schid, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	TP_ARGS(schid, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 		__field(u8, cssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 		__field(u8, ssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 		__field(u16, schno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 		__entry->cssid = schid.cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 		__entry->ssid = schid.ssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 		__entry->schno = schid.sch_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	TP_printk("schid=%x.%x.%04x cc=%d", __entry->cssid, __entry->ssid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 		  __entry->schno, __entry->cc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)  * s390_cio_csch - Clear Subchannel instruction (CSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) DEFINE_EVENT(s390_class_schid, s390_cio_csch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	TP_PROTO(struct subchannel_id schid, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	TP_ARGS(schid, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)  * s390_cio_hsch - Halt Subchannel instruction (HSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) DEFINE_EVENT(s390_class_schid, s390_cio_hsch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 	TP_PROTO(struct subchannel_id schid, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	TP_ARGS(schid, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)  * s390_cio_xsch - Cancel Subchannel instruction (XSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) DEFINE_EVENT(s390_class_schid, s390_cio_xsch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	TP_PROTO(struct subchannel_id schid, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	TP_ARGS(schid, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)  * s390_cio_rsch - Resume Subchannel instruction (RSCH) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)  * @schid: Subchannel ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) DEFINE_EVENT(s390_class_schid, s390_cio_rsch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	TP_PROTO(struct subchannel_id schid, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	TP_ARGS(schid, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) #define CHSC_MAX_REQUEST_LEN		64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) #define CHSC_MAX_RESPONSE_LEN		64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)  * s390_cio_chsc - Channel Subsystem Call (CHSC) instruction was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)  * @chsc: CHSC block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) TRACE_EVENT(s390_cio_chsc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	TP_PROTO(struct chsc_header *chsc, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	TP_ARGS(chsc, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 		__field(u16, code)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 		__field(u16, rcode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 		__array(u8, request, CHSC_MAX_REQUEST_LEN)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 		__array(u8, response, CHSC_MAX_RESPONSE_LEN)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 		__entry->code = chsc->code;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 		memcpy(&entry->request, chsc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 		       min_t(u16, chsc->length, CHSC_MAX_REQUEST_LEN));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 		chsc = (struct chsc_header *) ((char *) chsc + chsc->length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 		__entry->rcode = chsc->code;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 		memcpy(&entry->response, chsc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 		       min_t(u16, chsc->length, CHSC_MAX_RESPONSE_LEN));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	TP_printk("code=0x%04x cc=%d rcode=0x%04x", __entry->code,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 		  __entry->cc, __entry->rcode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)  * s390_cio_interrupt - An I/O interrupt occurred
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)  * @tpi_info: Address of the I/O interruption code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) TRACE_EVENT(s390_cio_interrupt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	TP_PROTO(struct tpi_info *tpi_info),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 	TP_ARGS(tpi_info),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 		__field_struct(struct tpi_info, tpi_info)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 		__field(u8, cssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 		__field(u8, ssid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 		__field(u16, schno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 		__field(u8, isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 		__field(u8, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 		__entry->tpi_info = *tpi_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 		__entry->cssid = tpi_info->schid.cssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 		__entry->ssid = tpi_info->schid.ssid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 		__entry->schno = tpi_info->schid.sch_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 		__entry->isc = tpi_info->isc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 		__entry->type = tpi_info->type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	TP_printk("schid=%x.%x.%04x isc=%d type=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 		  __entry->cssid, __entry->ssid, __entry->schno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 		  __entry->isc, __entry->type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)  * s390_cio_adapter_int - An adapter interrupt occurred
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)  * @tpi_info: Address of the I/O interruption code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) TRACE_EVENT(s390_cio_adapter_int,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 	TP_PROTO(struct tpi_info *tpi_info),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	TP_ARGS(tpi_info),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 		__field_struct(struct tpi_info, tpi_info)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 		__field(u8, isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 		__entry->tpi_info = *tpi_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 		__entry->isc = tpi_info->isc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	TP_printk("isc=%d", __entry->isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357)  * s390_cio_stcrw - Store Channel Report Word (STCRW) was performed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)  * @crw: Channel Report Word
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359)  * @cc: Condition code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) TRACE_EVENT(s390_cio_stcrw,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 	TP_PROTO(struct crw *crw, int cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) 	TP_ARGS(crw, cc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 		__field_struct(struct crw, crw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 		__field(int, cc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 		__field(u8, slct)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 		__field(u8, oflw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 		__field(u8, chn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 		__field(u8, rsc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 		__field(u8, anc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 		__field(u8, erc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 		__field(u16, rsid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 		__entry->crw = *crw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 		__entry->cc = cc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 		__entry->slct = crw->slct;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 		__entry->oflw = crw->oflw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 		__entry->chn = crw->chn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 		__entry->rsc = crw->rsc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 		__entry->anc = crw->anc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 		__entry->erc = crw->erc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 		__entry->rsid = crw->rsid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 	TP_printk("cc=%d slct=%d oflw=%d chn=%d rsc=%d anc=%d erc=0x%x "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 		  "rsid=0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 		  __entry->cc, __entry->slct, __entry->oflw,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 		  __entry->chn, __entry->rsc,  __entry->anc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 		  __entry->erc, __entry->rsid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) #endif /* _TRACE_S390_CIO_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) #undef TRACE_INCLUDE_PATH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) #define TRACE_INCLUDE_PATH .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) #undef TRACE_INCLUDE_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) #define TRACE_INCLUDE_FILE trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) #include <trace/define_trace.h>