^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #define TRACE_SYSTEM siox
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #if !defined(_TRACE_SIOX_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #define _TRACE_SIOX_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) TRACE_EVENT(siox_set_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) TP_PROTO(const struct siox_master *smaster,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) const struct siox_device *sdevice,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) unsigned int devno, size_t bufoffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) TP_ARGS(smaster, sdevice, devno, bufoffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) __field(int, busno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) __field(unsigned int, devno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) __field(size_t, inbytes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) __dynamic_array(u8, buf, sdevice->inbytes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) __entry->busno = smaster->busno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) __entry->devno = devno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) __entry->inbytes = sdevice->inbytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) memcpy(__get_dynamic_array(buf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) smaster->buf + bufoffset, sdevice->inbytes);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) TP_printk("siox-%d-%u [%*phD]",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) __entry->busno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) __entry->devno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) (int)__entry->inbytes, __get_dynamic_array(buf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) TRACE_EVENT(siox_get_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) TP_PROTO(const struct siox_master *smaster,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) const struct siox_device *sdevice,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) unsigned int devno, u8 status_clean,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) size_t bufoffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) TP_ARGS(smaster, sdevice, devno, status_clean, bufoffset),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) __field(int, busno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) __field(unsigned int, devno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) __field(u8, status_clean)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) __field(size_t, outbytes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) __dynamic_array(u8, buf, sdevice->outbytes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) __entry->busno = smaster->busno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) __entry->devno = devno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) __entry->status_clean = status_clean;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) __entry->outbytes = sdevice->outbytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) memcpy(__get_dynamic_array(buf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) smaster->buf + bufoffset, sdevice->outbytes);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) TP_printk("siox-%d-%u (%02hhx) [%*phD]",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) __entry->busno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) __entry->devno,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) __entry->status_clean,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) (int)__entry->outbytes, __get_dynamic_array(buf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #endif /* if !defined(_TRACE_SIOX_H) || defined(TRACE_HEADER_MULTI_READ) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #include <trace/define_trace.h>