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 OR Linux-OpenIB */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Copyright (c) 2018 Intel Corporation.  All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #define TRACE_SYSTEM ib_umad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #if !defined(_TRACE_IB_UMAD_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #define _TRACE_IB_UMAD_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) DECLARE_EVENT_CLASS(ib_umad_template,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	TP_PROTO(struct ib_umad_file *file, struct ib_user_mad_hdr *umad_hdr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 		 struct ib_mad_hdr *mad_hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	TP_ARGS(file, umad_hdr, mad_hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 		__field(u8, port_num)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 		__field(u8, sl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 		__field(u8, path_bits)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 		__field(u8, grh_present)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 		__field(u32, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 		__field(u32, status)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		__field(u32, timeout_ms)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 		__field(u32, retires)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 		__field(u32, length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 		__field(u32, qpn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 		__field(u32, qkey)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		__field(u8, gid_index)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 		__field(u8, hop_limit)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 		__field(u16, lid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		__field(u16, attr_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 		__field(u16, pkey_index)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 		__field(u8, base_version)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		__field(u8, mgmt_class)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		__field(u8, class_version)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		__field(u8, method)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 		__field(u32, flow_label)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 		__field(u16, mad_status)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		__field(u16, class_specific)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 		__field(u32, attr_mod)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 		__field(u64, tid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 		__array(u8, gid, 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		__field(u32, dev_index)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		__field(u8,  traffic_class)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		__entry->dev_index = file->port->ib_dev->index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		__entry->port_num = file->port->port_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		__entry->id = umad_hdr->id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		__entry->status = umad_hdr->status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		__entry->timeout_ms = umad_hdr->timeout_ms;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		__entry->retires = umad_hdr->retries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		__entry->length = umad_hdr->length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		__entry->qpn = umad_hdr->qpn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		__entry->qkey = umad_hdr->qkey;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 		__entry->lid = umad_hdr->lid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 		__entry->sl = umad_hdr->sl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		__entry->path_bits = umad_hdr->path_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		__entry->grh_present = umad_hdr->grh_present;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		__entry->gid_index = umad_hdr->gid_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		__entry->hop_limit = umad_hdr->hop_limit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		__entry->traffic_class = umad_hdr->traffic_class;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		memcpy(__entry->gid, umad_hdr->gid, sizeof(umad_hdr->gid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		__entry->flow_label = umad_hdr->flow_label;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		__entry->pkey_index = umad_hdr->pkey_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		__entry->base_version = mad_hdr->base_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 		__entry->mgmt_class = mad_hdr->mgmt_class;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		__entry->class_version = mad_hdr->class_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		__entry->method = mad_hdr->method;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		__entry->mad_status = mad_hdr->status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		__entry->class_specific = mad_hdr->class_specific;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		__entry->tid = mad_hdr->tid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		__entry->attr_id = mad_hdr->attr_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		__entry->attr_mod = mad_hdr->attr_mod;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	TP_printk("%d:%d umad_hdr: id 0x%08x status 0x%08x ms %u ret %u " \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		  "len %u QP%u qkey 0x%08x lid 0x%04x sl %u path_bits 0x%x " \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		  "grh 0x%x gidi %u hop_lim %u traf_cl %u gid %pI6c " \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		  "flow 0x%08x pkeyi %u  MAD: base_ver 0x%x class 0x%x " \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 		  "class_ver 0x%x method 0x%x status 0x%04x " \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		  "class_specific 0x%04x tid 0x%016llx attr_id 0x%04x " \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		  "attr_mod 0x%08x ",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		__entry->dev_index, __entry->port_num,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		__entry->id, __entry->status, __entry->timeout_ms,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		__entry->retires, __entry->length, be32_to_cpu(__entry->qpn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		be32_to_cpu(__entry->qkey), be16_to_cpu(__entry->lid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		__entry->sl, __entry->path_bits, __entry->grh_present,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		__entry->gid_index, __entry->hop_limit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 		__entry->traffic_class, &__entry->gid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		be32_to_cpu(__entry->flow_label), __entry->pkey_index,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 		__entry->base_version, __entry->mgmt_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		__entry->class_version, __entry->method,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		be16_to_cpu(__entry->mad_status),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		be16_to_cpu(__entry->class_specific),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		be64_to_cpu(__entry->tid), be16_to_cpu(__entry->attr_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		be32_to_cpu(__entry->attr_mod)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) DEFINE_EVENT(ib_umad_template, ib_umad_write,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	TP_PROTO(struct ib_umad_file *file, struct ib_user_mad_hdr *umad_hdr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		 struct ib_mad_hdr *mad_hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	TP_ARGS(file, umad_hdr, mad_hdr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) DEFINE_EVENT(ib_umad_template, ib_umad_read_recv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	TP_PROTO(struct ib_umad_file *file, struct ib_user_mad_hdr *umad_hdr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		 struct ib_mad_hdr *mad_hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	TP_ARGS(file, umad_hdr, mad_hdr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) DEFINE_EVENT(ib_umad_template, ib_umad_read_send,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	TP_PROTO(struct ib_umad_file *file, struct ib_user_mad_hdr *umad_hdr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		 struct ib_mad_hdr *mad_hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	TP_ARGS(file, umad_hdr, mad_hdr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) #endif /* _TRACE_IB_UMAD_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) #include <trace/define_trace.h>