Lines Matching full:packet

49 			       struct arm_spe_pkt *packet)  in arm_spe_get_payload()  argument
59 case 1: packet->payload = *(uint8_t *)buf; break; in arm_spe_get_payload()
60 case 2: packet->payload = get_unaligned_le16(buf); break; in arm_spe_get_payload()
61 case 4: packet->payload = get_unaligned_le32(buf); break; in arm_spe_get_payload()
62 case 8: packet->payload = get_unaligned_le64(buf); break; in arm_spe_get_payload()
69 static int arm_spe_get_pad(struct arm_spe_pkt *packet) in arm_spe_get_pad() argument
71 packet->type = ARM_SPE_PAD; in arm_spe_get_pad()
76 struct arm_spe_pkt *packet) in arm_spe_get_alignment() argument
83 packet->type = ARM_SPE_PAD; in arm_spe_get_alignment()
87 static int arm_spe_get_end(struct arm_spe_pkt *packet) in arm_spe_get_end() argument
89 packet->type = ARM_SPE_END; in arm_spe_get_end()
94 struct arm_spe_pkt *packet) in arm_spe_get_timestamp() argument
96 packet->type = ARM_SPE_TIMESTAMP; in arm_spe_get_timestamp()
97 return arm_spe_get_payload(buf, len, 0, packet); in arm_spe_get_timestamp()
101 struct arm_spe_pkt *packet) in arm_spe_get_events() argument
103 packet->type = ARM_SPE_EVENTS; in arm_spe_get_events()
110 packet->index = arm_spe_payload_len(buf[0]); in arm_spe_get_events()
112 return arm_spe_get_payload(buf, len, 0, packet); in arm_spe_get_events()
116 struct arm_spe_pkt *packet) in arm_spe_get_data_source() argument
118 packet->type = ARM_SPE_DATA_SOURCE; in arm_spe_get_data_source()
119 return arm_spe_get_payload(buf, len, 0, packet); in arm_spe_get_data_source()
123 struct arm_spe_pkt *packet) in arm_spe_get_context() argument
125 packet->type = ARM_SPE_CONTEXT; in arm_spe_get_context()
126 packet->index = SPE_CTX_PKT_HDR_INDEX(buf[0]); in arm_spe_get_context()
127 return arm_spe_get_payload(buf, len, 0, packet); in arm_spe_get_context()
131 struct arm_spe_pkt *packet) in arm_spe_get_op_type() argument
133 packet->type = ARM_SPE_OP_TYPE; in arm_spe_get_op_type()
134 packet->index = SPE_OP_PKT_HDR_CLASS(buf[0]); in arm_spe_get_op_type()
135 return arm_spe_get_payload(buf, len, 0, packet); in arm_spe_get_op_type()
139 const unsigned char ext_hdr, struct arm_spe_pkt *packet) in arm_spe_get_counter() argument
141 packet->type = ARM_SPE_COUNTER; in arm_spe_get_counter()
144 packet->index = SPE_HDR_EXTENDED_INDEX(buf[0], buf[1]); in arm_spe_get_counter()
146 packet->index = SPE_HDR_SHORT_INDEX(buf[0]); in arm_spe_get_counter()
148 return arm_spe_get_payload(buf, len, ext_hdr, packet); in arm_spe_get_counter()
152 const unsigned char ext_hdr, struct arm_spe_pkt *packet) in arm_spe_get_addr() argument
154 packet->type = ARM_SPE_ADDRESS; in arm_spe_get_addr()
157 packet->index = SPE_HDR_EXTENDED_INDEX(buf[0], buf[1]); in arm_spe_get_addr()
159 packet->index = SPE_HDR_SHORT_INDEX(buf[0]); in arm_spe_get_addr()
161 return arm_spe_get_payload(buf, len, ext_hdr, packet); in arm_spe_get_addr()
165 struct arm_spe_pkt *packet) in arm_spe_do_get_packet() argument
170 memset(packet, 0, sizeof(struct arm_spe_pkt)); in arm_spe_do_get_packet()
178 return arm_spe_get_pad(packet); in arm_spe_do_get_packet()
181 return arm_spe_get_end(packet); in arm_spe_do_get_packet()
184 return arm_spe_get_timestamp(buf, len, packet); in arm_spe_do_get_packet()
187 return arm_spe_get_events(buf, len, packet); in arm_spe_do_get_packet()
190 return arm_spe_get_data_source(buf, len, packet); in arm_spe_do_get_packet()
193 return arm_spe_get_context(buf, len, packet); in arm_spe_do_get_packet()
196 return arm_spe_get_op_type(buf, len, packet); in arm_spe_do_get_packet()
206 return arm_spe_get_alignment(buf, len, packet); in arm_spe_do_get_packet()
212 * address packet and counter packet, so don't need to distinguish if in arm_spe_do_get_packet()
216 return arm_spe_get_addr(buf, len, ext_hdr, packet); in arm_spe_do_get_packet()
219 return arm_spe_get_counter(buf, len, ext_hdr, packet); in arm_spe_do_get_packet()
225 struct arm_spe_pkt *packet) in arm_spe_get_packet() argument
229 ret = arm_spe_do_get_packet(buf, len, packet); in arm_spe_get_packet()
233 if (ret > 0 && packet->type == ARM_SPE_PAD) { in arm_spe_get_packet()
279 static int arm_spe_pkt_desc_event(const struct arm_spe_pkt *packet, in arm_spe_pkt_desc_event() argument
282 u64 payload = packet->payload; in arm_spe_pkt_desc_event()
319 static int arm_spe_pkt_desc_op_type(const struct arm_spe_pkt *packet, in arm_spe_pkt_desc_op_type() argument
322 u64 payload = packet->payload; in arm_spe_pkt_desc_op_type()
325 switch (packet->index) { in arm_spe_pkt_desc_op_type()
414 static int arm_spe_pkt_desc_addr(const struct arm_spe_pkt *packet, in arm_spe_pkt_desc_addr() argument
417 int ns, el, idx = packet->index; in arm_spe_pkt_desc_addr()
419 u64 payload = packet->payload; in arm_spe_pkt_desc_addr()
456 static int arm_spe_pkt_desc_counter(const struct arm_spe_pkt *packet, in arm_spe_pkt_desc_counter() argument
459 u64 payload = packet->payload; in arm_spe_pkt_desc_counter()
460 const char *name = arm_spe_pkt_name(packet->type); in arm_spe_pkt_desc_counter()
466 switch (packet->index) { in arm_spe_pkt_desc_counter()
483 int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, in arm_spe_pkt_desc() argument
486 int idx = packet->index; in arm_spe_pkt_desc()
487 unsigned long long payload = packet->payload; in arm_spe_pkt_desc()
488 const char *name = arm_spe_pkt_name(packet->type); in arm_spe_pkt_desc()
493 switch (packet->type) { in arm_spe_pkt_desc()
500 err = arm_spe_pkt_desc_event(packet, buf, buf_len); in arm_spe_pkt_desc()
503 err = arm_spe_pkt_desc_op_type(packet, buf, buf_len); in arm_spe_pkt_desc()
510 err = arm_spe_pkt_desc_addr(packet, buf, buf_len); in arm_spe_pkt_desc()
517 err = arm_spe_pkt_desc_counter(packet, buf, buf_len); in arm_spe_pkt_desc()
520 /* Unknown packet type */ in arm_spe_pkt_desc()
529 name, payload, packet->index); in arm_spe_pkt_desc()