__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2024 Takashi Sakamoto

#undef TRACE_SYSTEM
#define TRACE_SYSTEM	firewire

#if !defined(_FIREWIRE_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)
#define _FIREWIRE_TRACE_EVENT_H

#include <linux/tracepoint.h>
#include <linux/firewire.h>

#include <linux/firewire-constants.h>

// Some macros are defined in 'drivers/firewire/packet-header-definitions.h'.

// The content of TP_printk field is preprocessed, then put to the module binary.
#define ASYNC_HEADER_GET_DESTINATION(header)	\
	(((header)[0] & ASYNC_HEADER_Q0_DESTINATION_MASK) >> ASYNC_HEADER_Q0_DESTINATION_SHIFT)

#define ASYNC_HEADER_GET_TLABEL(header)	\
	(((header)[0] & ASYNC_HEADER_Q0_TLABEL_MASK) >> ASYNC_HEADER_Q0_TLABEL_SHIFT)

#define ASYNC_HEADER_GET_TCODE(header)	\
	(((header)[0] & ASYNC_HEADER_Q0_TCODE_MASK) >> ASYNC_HEADER_Q0_TCODE_SHIFT)

#define ASYNC_HEADER_GET_SOURCE(header)	\
	(((header)[1] & ASYNC_HEADER_Q1_SOURCE_MASK) >> ASYNC_HEADER_Q1_SOURCE_SHIFT)

#define ASYNC_HEADER_GET_OFFSET(header)	\
	((((unsigned long long)((header)[1] & ASYNC_HEADER_Q1_OFFSET_HIGH_MASK)) >> ASYNC_HEADER_Q1_OFFSET_HIGH_SHIFT) << 32)| \
	(header)[2]

#define ASYNC_HEADER_GET_RCODE(header)	\
	(((header)[1] & ASYNC_HEADER_Q1_RCODE_MASK) >> ASYNC_HEADER_Q1_RCODE_SHIFT)

#define QUADLET_SIZE	4

DECLARE_EVENT_CLASS(async_outbound_initiate_template,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, const u32 *header, const u32 *data, unsigned int data_count),
	TP_ARGS(transaction, card_index, generation, scode, header, data, data_count),
	TP_STRUCT__entry(
		__field(u64, transaction)
		__field(u8, card_index)
		__field(u8, generation)
		__field(u8, scode)
		__array(u32, header, ASYNC_HEADER_QUADLET_COUNT)
		__dynamic_array(u32, data, data_count)
	),
	TP_fast_assign(
		__entry->transaction = transaction;
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->scode = scode;
		memcpy(__entry->header, header, QUADLET_SIZE * ASYNC_HEADER_QUADLET_COUNT);
		memcpy(__get_dynamic_array(data), data, __get_dynamic_array_len(data));
	),
	// This format is for the request subaction.
	TP_printk(
		"transaction=0x%llx card_index=%u generation=%u scode=%u dst_id=0x%04x tlabel=%u tcode=%u src_id=0x%04x offset=0x%012llx header=%s data=%s",
		__entry->transaction,
		__entry->card_index,
		__entry->generation,
		__entry->scode,
		ASYNC_HEADER_GET_DESTINATION(__entry->header),
		ASYNC_HEADER_GET_TLABEL(__entry->header),
		ASYNC_HEADER_GET_TCODE(__entry->header),
		ASYNC_HEADER_GET_SOURCE(__entry->header),
		ASYNC_HEADER_GET_OFFSET(__entry->header),
		__print_array(__entry->header, ASYNC_HEADER_QUADLET_COUNT, QUADLET_SIZE),
		__print_array(__get_dynamic_array(data),
			      __get_dynamic_array_len(data) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

// The value of status is one of ack codes and rcodes specific to Linux FireWire subsystem.
DECLARE_EVENT_CLASS(async_outbound_complete_template,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, unsigned int status, unsigned int timestamp),
	TP_ARGS(transaction, card_index, generation, scode, status, timestamp),
	TP_STRUCT__entry(
		__field(u64, transaction)
		__field(u8, card_index)
		__field(u8, generation)
		__field(u8, scode)
		__field(u8, status)
		__field(u16, timestamp)
	),
	TP_fast_assign(
		__entry->transaction = transaction;
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->scode = scode;
		__entry->status = status;
		__entry->timestamp = timestamp;
	),
	TP_printk(
		"transaction=0x%llx card_index=%u generation=%u scode=%u status=%u timestamp=0x%04x",
		__entry->transaction,
		__entry->card_index,
		__entry->generation,
		__entry->scode,
		__entry->status,
		__entry->timestamp
	)
);

// The value of status is one of ack codes and rcodes specific to Linux FireWire subsystem.
DECLARE_EVENT_CLASS(async_inbound_template,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, unsigned int status, unsigned int timestamp, const u32 *header, const u32 *data, unsigned int data_count),
	TP_ARGS(transaction, card_index, generation, scode, status, timestamp, header, data, data_count),
	TP_STRUCT__entry(
		__field(u64, transaction)
		__field(u8, card_index)
		__field(u8, generation)
		__field(u8, scode)
		__field(u8, status)
		__field(u16, timestamp)
		__array(u32, header, ASYNC_HEADER_QUADLET_COUNT)
		__dynamic_array(u32, data, data_count)
	),
	TP_fast_assign(
		__entry->transaction = transaction;
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->scode = scode;
		__entry->status = status;
		__entry->timestamp = timestamp;
		memcpy(__entry->header, header, QUADLET_SIZE * ASYNC_HEADER_QUADLET_COUNT);
		memcpy(__get_dynamic_array(data), data, __get_dynamic_array_len(data));
	),
	// This format is for the response subaction.
	TP_printk(
		"transaction=0x%llx card_index=%u generation=%u scode=%u status=%u timestamp=0x%04x dst_id=0x%04x tlabel=%u tcode=%u src_id=0x%04x rcode=%u header=%s data=%s",
		__entry->transaction,
		__entry->card_index,
		__entry->generation,
		__entry->scode,
		__entry->status,
		__entry->timestamp,
		ASYNC_HEADER_GET_DESTINATION(__entry->header),
		ASYNC_HEADER_GET_TLABEL(__entry->header),
		ASYNC_HEADER_GET_TCODE(__entry->header),
		ASYNC_HEADER_GET_SOURCE(__entry->header),
		ASYNC_HEADER_GET_RCODE(__entry->header),
		__print_array(__entry->header, ASYNC_HEADER_QUADLET_COUNT, QUADLET_SIZE),
		__print_array(__get_dynamic_array(data),
			      __get_dynamic_array_len(data) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

DEFINE_EVENT(async_outbound_initiate_template, async_request_outbound_initiate,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, const u32 *header, const u32 *data, unsigned int data_count),
	TP_ARGS(transaction, card_index, generation, scode, header, data, data_count)
);

DEFINE_EVENT(async_outbound_complete_template, async_request_outbound_complete,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, unsigned int status, unsigned int timestamp),
	TP_ARGS(transaction, card_index, generation, scode, status, timestamp)
);

DEFINE_EVENT(async_inbound_template, async_response_inbound,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, unsigned int status, unsigned int timestamp, const u32 *header, const u32 *data, unsigned int data_count),
	TP_ARGS(transaction, card_index, generation, scode, status, timestamp, header, data, data_count)
);

DEFINE_EVENT_PRINT(async_inbound_template, async_request_inbound,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, unsigned int status, unsigned int timestamp, const u32 *header, const u32 *data, unsigned int data_count),
	TP_ARGS(transaction, card_index, generation, scode, status, timestamp, header, data, data_count),
	TP_printk(
		"transaction=0x%llx card_index=%u generation=%u scode=%u status=%u timestamp=0x%04x dst_id=0x%04x tlabel=%u tcode=%u src_id=0x%04x offset=0x%012llx header=%s data=%s",
		__entry->transaction,
		__entry->card_index,
		__entry->generation,
		__entry->scode,
		__entry->status,
		__entry->timestamp,
		ASYNC_HEADER_GET_DESTINATION(__entry->header),
		ASYNC_HEADER_GET_TLABEL(__entry->header),
		ASYNC_HEADER_GET_TCODE(__entry->header),
		ASYNC_HEADER_GET_SOURCE(__entry->header),
		ASYNC_HEADER_GET_OFFSET(__entry->header),
		__print_array(__entry->header, ASYNC_HEADER_QUADLET_COUNT, QUADLET_SIZE),
		__print_array(__get_dynamic_array(data),
			      __get_dynamic_array_len(data) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

DEFINE_EVENT_PRINT(async_outbound_initiate_template, async_response_outbound_initiate,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, const u32 *header, const u32 *data, unsigned int data_count),
	TP_ARGS(transaction, card_index, generation, scode, header, data, data_count),
	TP_printk(
		"transaction=0x%llx card_index=%u generation=%u scode=%u dst_id=0x%04x tlabel=%u tcode=%u src_id=0x%04x rcode=%u header=%s data=%s",
		__entry->transaction,
		__entry->card_index,
		__entry->generation,
		__entry->scode,
		ASYNC_HEADER_GET_DESTINATION(__entry->header),
		ASYNC_HEADER_GET_TLABEL(__entry->header),
		ASYNC_HEADER_GET_TCODE(__entry->header),
		ASYNC_HEADER_GET_SOURCE(__entry->header),
		ASYNC_HEADER_GET_RCODE(__entry->header),
		__print_array(__entry->header, ASYNC_HEADER_QUADLET_COUNT, QUADLET_SIZE),
		__print_array(__get_dynamic_array(data),
			      __get_dynamic_array_len(data) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

DEFINE_EVENT(async_outbound_complete_template, async_response_outbound_complete,
	TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generation, unsigned int scode, unsigned int status, unsigned int timestamp),
	TP_ARGS(transaction, card_index, generation, scode, status, timestamp)
);

#undef ASYNC_HEADER_GET_DESTINATION
#undef ASYNC_HEADER_GET_TLABEL
#undef ASYNC_HEADER_GET_TCODE
#undef ASYNC_HEADER_GET_SOURCE
#undef ASYNC_HEADER_GET_OFFSET
#undef ASYNC_HEADER_GET_RCODE

TRACE_EVENT(async_phy_outbound_initiate,
	TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, u32 first_quadlet, u32 second_quadlet),
	TP_ARGS(packet, card_index, generation, first_quadlet, second_quadlet),
	TP_STRUCT__entry(
		__field(u64, packet)
		__field(u8, card_index)
		__field(u8, generation)
		__field(u32, first_quadlet)
		__field(u32, second_quadlet)
	),
	TP_fast_assign(
		__entry->packet = packet;
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->first_quadlet = first_quadlet;
		__entry->second_quadlet = second_quadlet
	),
	TP_printk(
		"packet=0x%llx card_index=%u generation=%u first_quadlet=0x%08x second_quadlet=0x%08x",
		__entry->packet,
		__entry->card_index,
		__entry->generation,
		__entry->first_quadlet,
		__entry->second_quadlet
	)
);

TRACE_EVENT(async_phy_outbound_complete,
	TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, unsigned int status, unsigned int timestamp),
	TP_ARGS(packet, card_index, generation, status, timestamp),
	TP_STRUCT__entry(
		__field(u64, packet)
		__field(u8, card_index)
		__field(u8, generation)
		__field(u8, status)
		__field(u16, timestamp)
	),
	TP_fast_assign(
		__entry->packet = packet;
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->status = status;
		__entry->timestamp = timestamp;
	),
	TP_printk(
		"packet=0x%llx card_index=%u generation=%u status=%u timestamp=0x%04x",
		__entry->packet,
		__entry->card_index,
		__entry->generation,
		__entry->status,
		__entry->timestamp
	)
);

TRACE_EVENT(async_phy_inbound,
	TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, unsigned int status, unsigned int timestamp, u32 first_quadlet, u32 second_quadlet),
	TP_ARGS(packet, card_index, generation, status, timestamp, first_quadlet, second_quadlet),
	TP_STRUCT__entry(
		__field(u64, packet)
		__field(u8, card_index)
		__field(u8, generation)
		__field(u8, status)
		__field(u16, timestamp)
		__field(u32, first_quadlet)
		__field(u32, second_quadlet)
	),
	TP_fast_assign(
		__entry->packet = packet;
		__entry->generation = generation;
		__entry->status = status;
		__entry->timestamp = timestamp;
		__entry->first_quadlet = first_quadlet;
		__entry->second_quadlet = second_quadlet
	),
	TP_printk(
		"packet=0x%llx card_index=%u generation=%u status=%u timestamp=0x%04x first_quadlet=0x%08x second_quadlet=0x%08x",
		__entry->packet,
		__entry->card_index,
		__entry->generation,
		__entry->status,
		__entry->timestamp,
		__entry->first_quadlet,
		__entry->second_quadlet
	)
);

DECLARE_EVENT_CLASS(bus_reset_arrange_template,
	TP_PROTO(unsigned int card_index, unsigned int generation, bool short_reset),
	TP_ARGS(card_index, generation, short_reset),
	TP_STRUCT__entry(
		__field(u8, card_index)
		__field(u8, generation)
		__field(bool, short_reset)
	),
	TP_fast_assign(
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->short_reset = short_reset;
	),
	TP_printk(
		"card_index=%u generation=%u short_reset=%s",
		__entry->card_index,
		__entry->generation,
		__entry->short_reset ? "true" : "false"
	)
);

DEFINE_EVENT(bus_reset_arrange_template, bus_reset_initiate,
	TP_PROTO(unsigned int card_index, unsigned int generation, bool short_reset),
	TP_ARGS(card_index, generation, short_reset)
);

DEFINE_EVENT(bus_reset_arrange_template, bus_reset_schedule,
	TP_PROTO(unsigned int card_index, unsigned int generation, bool short_reset),
	TP_ARGS(card_index, generation, short_reset)
);

DEFINE_EVENT(bus_reset_arrange_template, bus_reset_postpone,
	TP_PROTO(unsigned int card_index, unsigned int generation, bool short_reset),
	TP_ARGS(card_index, generation, short_reset)
);

TRACE_EVENT(bus_reset_handle,
	TP_PROTO(unsigned int card_index, unsigned int generation, unsigned int node_id, bool bm_abdicate, u32 *self_ids, unsigned int self_id_count),
	TP_ARGS(card_index, generation, node_id, bm_abdicate, self_ids, self_id_count),
	TP_STRUCT__entry(
		__field(u8, card_index)
		__field(u8, generation)
		__field(u8, node_id)
		__field(bool, bm_abdicate)
		__dynamic_array(u32, self_ids, self_id_count)
	),
	TP_fast_assign(
		__entry->card_index = card_index;
		__entry->generation = generation;
		__entry->node_id = node_id;
		__entry->bm_abdicate = bm_abdicate;
		memcpy(__get_dynamic_array(self_ids), self_ids, __get_dynamic_array_len(self_ids));
	),
	TP_printk(
		"card_index=%u generation=%u node_id=0x%04x bm_abdicate=%s self_ids=%s",
		__entry->card_index,
		__entry->generation,
		__entry->node_id,
		__entry->bm_abdicate ? "true" : "false",
		__print_array(__get_dynamic_array(self_ids),
			      __get_dynamic_array_len(self_ids) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

// Some macros are defined in 'drivers/firewire/phy-packet-definitions.h'.

// The content of TP_printk field is preprocessed, then put to the module binary.

#define PHY_PACKET_SELF_ID_GET_PHY_ID(quads)		\
	((((const u32 *)quads)[0] & SELF_ID_PHY_ID_MASK) >> SELF_ID_PHY_ID_SHIFT)

#define PHY_PACKET_SELF_ID_GET_LINK_ACTIVE(quads)	\
	((((const u32 *)quads)[0] & SELF_ID_ZERO_LINK_ACTIVE_MASK) >> SELF_ID_ZERO_LINK_ACTIVE_SHIFT)

#define PHY_PACKET_SELF_ID_GET_GAP_COUNT(quads)		\
	((((const u32 *)quads)[0] & SELF_ID_ZERO_GAP_COUNT_MASK) >> SELF_ID_ZERO_GAP_COUNT_SHIFT)

#define PHY_PACKET_SELF_ID_GET_SCODE(quads)		\
	((((const u32 *)quads)[0] & SELF_ID_ZERO_SCODE_MASK) >> SELF_ID_ZERO_SCODE_SHIFT)

#define PHY_PACKET_SELF_ID_GET_CONTENDER(quads)		\
	((((const u32 *)quads)[0] & SELF_ID_ZERO_CONTENDER_MASK) >> SELF_ID_ZERO_CONTENDER_SHIFT)

#define PHY_PACKET_SELF_ID_GET_POWER_CLASS(quads)	\
	((((const u32 *)quads)[0] & SELF_ID_ZERO_POWER_CLASS_MASK) >> SELF_ID_ZERO_POWER_CLASS_SHIFT)

#define PHY_PACKET_SELF_ID_GET_INITIATED_RESET(quads)	\
	((((const u32 *)quads)[0] & SELF_ID_ZERO_INITIATED_RESET_MASK) >> SELF_ID_ZERO_INITIATED_RESET_SHIFT)

TRACE_EVENT(self_id_sequence,
	TP_PROTO(unsigned int card_index, const u32 *self_id_sequence, unsigned int quadlet_count, unsigned int generation),
	TP_ARGS(card_index, self_id_sequence, quadlet_count, generation),
	TP_STRUCT__entry(
		__field(u8, card_index)
		__field(u8, generation)
		__dynamic_array(u8, port_status, self_id_sequence_get_port_capacity(quadlet_count))
		__dynamic_array(u32, self_id_sequence, quadlet_count)
	),
	TP_fast_assign(
		__entry->card_index = card_index;
		__entry->generation = generation;
		{
			u8 *port_status = __get_dynamic_array(port_status);
			unsigned int port_index;

			for (port_index = 0; port_index < __get_dynamic_array_len(port_status); ++port_index) {
				port_status[port_index] =
					self_id_sequence_get_port_status(self_id_sequence,
									 quadlet_count, port_index);
			}
		}
		memcpy(__get_dynamic_array(self_id_sequence), self_id_sequence,
					   __get_dynamic_array_len(self_id_sequence));
	),
	TP_printk(
		"card_index=%u generation=%u phy_id=0x%02x link_active=%s gap_count=%u scode=%u contender=%s power_class=%u initiated_reset=%s port_status=%s self_id_sequence=%s",
		__entry->card_index,
		__entry->generation,
		PHY_PACKET_SELF_ID_GET_PHY_ID(__get_dynamic_array(self_id_sequence)),
		PHY_PACKET_SELF_ID_GET_LINK_ACTIVE(__get_dynamic_array(self_id_sequence)) ? "true" : "false",
		PHY_PACKET_SELF_ID_GET_GAP_COUNT(__get_dynamic_array(self_id_sequence)),
		PHY_PACKET_SELF_ID_GET_SCODE(__get_dynamic_array(self_id_sequence)),
		PHY_PACKET_SELF_ID_GET_CONTENDER(__get_dynamic_array(self_id_sequence)) ? "true" : "false",
		PHY_PACKET_SELF_ID_GET_POWER_CLASS(__get_dynamic_array(self_id_sequence)),
		PHY_PACKET_SELF_ID_GET_INITIATED_RESET(__get_dynamic_array(self_id_sequence)) ? "true" : "false",
		__print_array(__get_dynamic_array(port_status), __get_dynamic_array_len(port_status), 1),
		__print_array(__get_dynamic_array(self_id_sequence),
			      __get_dynamic_array_len(self_id_sequence) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

#undef PHY_PACKET_SELF_ID_GET_PHY_ID
#undef PHY_PACKET_SELF_ID_GET_LINK_ACTIVE
#undef PHY_PACKET_SELF_ID_GET_GAP_COUNT
#undef PHY_PACKET_SELF_ID_GET_SCODE
#undef PHY_PACKET_SELF_ID_GET_CONTENDER
#undef PHY_PACKET_SELF_ID_GET_POWER_CLASS
#undef PHY_PACKET_SELF_ID_GET_INITIATED_RESET

TRACE_EVENT_CONDITION(isoc_outbound_allocate,
	TP_PROTO(const struct fw_iso_context *ctx, unsigned int channel, unsigned int scode),
	TP_ARGS(ctx, channel, scode),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(u8, channel)
		__field(u8, scode)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->channel = channel;
		__entry->scode = scode;
	),
	TP_printk(
		"context=0x%llx card_index=%u channel=%u scode=%u",
		__entry->context,
		__entry->card_index,
		__entry->channel,
		__entry->scode
	)
);

TRACE_EVENT_CONDITION(isoc_inbound_single_allocate,
	TP_PROTO(const struct fw_iso_context *ctx, unsigned int channel, unsigned int header_size),
	TP_ARGS(ctx, channel, header_size),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(u8, channel)
		__field(u8, header_size)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->channel = channel;
		__entry->header_size = header_size;
	),
	TP_printk(
		"context=0x%llx card_index=%u channel=%u header_size=%u",
		__entry->context,
		__entry->card_index,
		__entry->channel,
		__entry->header_size
	)
);

TRACE_EVENT_CONDITION(isoc_inbound_multiple_allocate,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
	),
	TP_printk(
		"context=0x%llx card_index=%u",
		__entry->context,
		__entry->card_index
	)
);

DECLARE_EVENT_CLASS(isoc_destroy_template,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
	),
	TP_printk(
		"context=0x%llx card_index=%u",
		__entry->context,
		__entry->card_index
	)
)

DEFINE_EVENT_CONDITION(isoc_destroy_template, isoc_outbound_destroy,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT)
);

DEFINE_EVENT_CONDITION(isoc_destroy_template, isoc_inbound_single_destroy,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE)
);

DEFINE_EVENT_CONDITION(isoc_destroy_template, isoc_inbound_multiple_destroy,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
);

TRACE_EVENT(isoc_inbound_multiple_channels,
	TP_PROTO(const struct fw_iso_context *ctx, u64 channels),
	TP_ARGS(ctx, channels),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(u64, channels)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->channels = channels;
	),
	TP_printk(
		"context=0x%llx card_index=%u channels=0x%016llx",
		__entry->context,
		__entry->card_index,
		__entry->channels
	)
);

TRACE_EVENT_CONDITION(isoc_outbound_start,
	TP_PROTO(const struct fw_iso_context *ctx, int cycle_match),
	TP_ARGS(ctx, cycle_match),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(bool, cycle_match)
		__field(u16, cycle)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->cycle_match = cycle_match < 0 ? false : true;
		__entry->cycle = __entry->cycle_match ? (u16)cycle_match : 0;
	),
	TP_printk(
		"context=0x%llx card_index=%u cycle_match=%s cycle=0x%04x",
		__entry->context,
		__entry->card_index,
		__entry->cycle_match ? "true" : "false",
		__entry->cycle
	)
);

DECLARE_EVENT_CLASS(isoc_inbound_start_template,
	TP_PROTO(const struct fw_iso_context *ctx, int cycle_match, unsigned int sync, unsigned int tags),
	TP_ARGS(ctx, cycle_match, sync, tags),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(bool, cycle_match)
		__field(u16, cycle)
		__field(u8, sync)
		__field(u8, tags)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->cycle_match = cycle_match < 0 ? false : true;
		__entry->cycle = __entry->cycle_match ? (u16)cycle_match : 0;
		__entry->sync = sync;
		__entry->tags = tags;
	),
	TP_printk(
		"context=0x%llx card_index=%u cycle_match=%s cycle=0x%04x sync=%u tags=%s",
		__entry->context,
		__entry->card_index,
		__entry->cycle_match ? "true" : "false",
		__entry->cycle,
		__entry->sync,
		__print_flags(__entry->tags, "|",
			{ FW_ISO_CONTEXT_MATCH_TAG0, "0" },
			{ FW_ISO_CONTEXT_MATCH_TAG1, "1" },
			{ FW_ISO_CONTEXT_MATCH_TAG2, "2" },
			{ FW_ISO_CONTEXT_MATCH_TAG3, "3" }
		)
	)
);

DEFINE_EVENT_CONDITION(isoc_inbound_start_template, isoc_inbound_single_start,
	TP_PROTO(const struct fw_iso_context *ctx, int cycle_match, unsigned int sync, unsigned int tags),
	TP_ARGS(ctx, cycle_match, sync, tags),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE)
);

DEFINE_EVENT_CONDITION(isoc_inbound_start_template, isoc_inbound_multiple_start,
	TP_PROTO(const struct fw_iso_context *ctx, int cycle_match, unsigned int sync, unsigned int tags),
	TP_ARGS(ctx, cycle_match, sync, tags),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
);

DECLARE_EVENT_CLASS(isoc_stop_template,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
	),
	TP_printk(
		"context=0x%llx card_index=%u",
		__entry->context,
		__entry->card_index
	)
)

DEFINE_EVENT_CONDITION(isoc_stop_template, isoc_outbound_stop,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT)
);

DEFINE_EVENT_CONDITION(isoc_stop_template, isoc_inbound_single_stop,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE)
);

DEFINE_EVENT_CONDITION(isoc_stop_template, isoc_inbound_multiple_stop,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
);

DECLARE_EVENT_CLASS(isoc_flush_template,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
	),
	TP_printk(
		"context=0x%llx card_index=%u",
		__entry->context,
		__entry->card_index
	)
);

DEFINE_EVENT_CONDITION(isoc_flush_template, isoc_outbound_flush,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT)
);

DEFINE_EVENT_CONDITION(isoc_flush_template, isoc_inbound_single_flush,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE)
);

DEFINE_EVENT_CONDITION(isoc_flush_template, isoc_inbound_multiple_flush,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
);

DECLARE_EVENT_CLASS(isoc_flush_completions_template,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
	),
	TP_printk(
		"context=0x%llx card_index=%u",
		__entry->context,
		__entry->card_index
	)
);

DEFINE_EVENT_CONDITION(isoc_flush_completions_template, isoc_outbound_flush_completions,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT)
);

DEFINE_EVENT_CONDITION(isoc_flush_completions_template, isoc_inbound_single_flush_completions,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE)
);

DEFINE_EVENT_CONDITION(isoc_flush_completions_template, isoc_inbound_multiple_flush_completions,
	TP_PROTO(const struct fw_iso_context *ctx),
	TP_ARGS(ctx),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL)
);

#define TP_STRUCT__entry_iso_packet(ctx, buffer_offset, packet)				\
	TP_STRUCT__entry(								\
		__field(u64, context)							\
		__field(u8, card_index)							\
		__field(u32, buffer_offset)						\
		__field(bool, interrupt)						\
		__field(bool, skip)							\
		__field(u8, sy)								\
		__field(u8, tag)							\
		__dynamic_array(u32, header, packet->header_length / QUADLET_SIZE)	\
	)

#define TP_fast_assign_iso_packet(ctx, buffer_offset, packet)		\
	TP_fast_assign(							\
		__entry->context = (uintptr_t)ctx;			\
		__entry->card_index = ctx->card->index;			\
		__entry->buffer_offset = buffer_offset;			\
		__entry->interrupt = packet->interrupt;			\
		__entry->skip = packet->skip;				\
		__entry->sy = packet->sy;				\
		__entry->tag = packet->tag;				\
		memcpy(__get_dynamic_array(header), packet->header,	\
		       __get_dynamic_array_len(header));		\
	)

TRACE_EVENT_CONDITION(isoc_outbound_queue,
	TP_PROTO(const struct fw_iso_context *ctx, unsigned long buffer_offset, const struct fw_iso_packet *packet),
	TP_ARGS(ctx, buffer_offset, packet),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT),
	TP_STRUCT__entry_iso_packet(ctx, buffer_offset, packet),
	TP_fast_assign_iso_packet(ctx, buffer_offset, packet),
	TP_printk(
		"context=0x%llx card_index=%u buffer_offset=0x%x interrupt=%s skip=%s sy=%d tag=%u header=%s",
		__entry->context,
		__entry->card_index,
		__entry->buffer_offset,
		__entry->interrupt ? "true" : "false",
		__entry->skip ? "true" : "false",
		__entry->sy,
		__entry->tag,
		__print_array(__get_dynamic_array(header),
			      __get_dynamic_array_len(header) / QUADLET_SIZE, QUADLET_SIZE)
	)
);

TRACE_EVENT_CONDITION(isoc_inbound_single_queue,
	TP_PROTO(const struct fw_iso_context *ctx, unsigned long buffer_offset, const struct fw_iso_packet *packet),
	TP_ARGS(ctx, buffer_offset, packet),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE),
	TP_STRUCT__entry_iso_packet(ctx, buffer_offset, packet),
	TP_fast_assign_iso_packet(ctx, buffer_offset, packet),
	TP_printk(
		"context=0x%llx card_index=%u buffer_offset=0x%x interrupt=%s skip=%s",
		__entry->context,
		__entry->card_index,
		__entry->buffer_offset,
		__entry->interrupt ? "true" : "false",
		__entry->skip ? "true" : "false"
	)
);

TRACE_EVENT_CONDITION(isoc_inbound_multiple_queue,
	TP_PROTO(const struct fw_iso_context *ctx, unsigned long buffer_offset, const struct fw_iso_packet *packet),
	TP_ARGS(ctx, buffer_offset, packet),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL),
	TP_STRUCT__entry_iso_packet(ctx, buffer_offset, packet),
	TP_fast_assign_iso_packet(ctx, buffer_offset, packet),
	TP_printk(
		"context=0x%llx card_index=%u buffer_offset=0x%x interrupt=%s",
		__entry->context,
		__entry->card_index,
		__entry->buffer_offset,
		__entry->interrupt ? "true" : "false"
	)
);

#undef TP_STRUCT__entry_iso_packet
#undef TP_fast_assign_iso_packet

#ifndef show_cause
enum fw_iso_context_completions_cause {
	FW_ISO_CONTEXT_COMPLETIONS_CAUSE_FLUSH = 0,
	FW_ISO_CONTEXT_COMPLETIONS_CAUSE_INTERRUPT,
	FW_ISO_CONTEXT_COMPLETIONS_CAUSE_HEADER_OVERFLOW,
};
#define show_cause(cause) 								\
	__print_symbolic(cause,								\
		{ FW_ISO_CONTEXT_COMPLETIONS_CAUSE_FLUSH, "FLUSH" },			\
		{ FW_ISO_CONTEXT_COMPLETIONS_CAUSE_INTERRUPT, "INTERRUPT" },		\
		{ FW_ISO_CONTEXT_COMPLETIONS_CAUSE_HEADER_OVERFLOW, "HEADER_OVERFLOW" }	\
	)
#endif

DECLARE_EVENT_CLASS(isoc_single_completions_template,
	TP_PROTO(const struct fw_iso_context *ctx, u16 timestamp, enum fw_iso_context_completions_cause cause, const u32 *header, unsigned int header_length),
	TP_ARGS(ctx, timestamp, cause, header, header_length),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(u16, timestamp)
		__field(u8, cause)
		__dynamic_array(u32, header, header_length / QUADLET_SIZE)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->timestamp = timestamp;
		__entry->cause = cause;
		memcpy(__get_dynamic_array(header), header, __get_dynamic_array_len(header));
	),
	TP_printk(
		"context=0x%llx card_index=%u timestamp=0x%04x cause=%s header=%s",
		__entry->context,
		__entry->card_index,
		__entry->timestamp,
		show_cause(__entry->cause),
		__print_array(__get_dynamic_array(header),
			      __get_dynamic_array_len(header) / QUADLET_SIZE, QUADLET_SIZE)
	)
)

DEFINE_EVENT_CONDITION(isoc_single_completions_template, isoc_outbound_completions,
	TP_PROTO(const struct fw_iso_context *ctx, u16 timestamp, enum fw_iso_context_completions_cause cause, const u32 *header, unsigned int header_length),
	TP_ARGS(ctx, timestamp, cause, header, header_length),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_TRANSMIT)
);

DEFINE_EVENT_CONDITION(isoc_single_completions_template, isoc_inbound_single_completions,
	TP_PROTO(const struct fw_iso_context *ctx, u16 timestamp, enum fw_iso_context_completions_cause cause, const u32 *header, unsigned int header_length),
	TP_ARGS(ctx, timestamp, cause, header, header_length),
	TP_CONDITION(ctx->type == FW_ISO_CONTEXT_RECEIVE)
);

TRACE_EVENT(isoc_inbound_multiple_completions,
	TP_PROTO(const struct fw_iso_context *ctx, unsigned int completed, enum fw_iso_context_completions_cause cause),
	TP_ARGS(ctx, completed, cause),
	TP_STRUCT__entry(
		__field(u64, context)
		__field(u8, card_index)
		__field(u16, completed)
		__field(u8, cause)
	),
	TP_fast_assign(
		__entry->context = (uintptr_t)ctx;
		__entry->card_index = ctx->card->index;
		__entry->completed = completed;
		__entry->cause = cause;
	),
	TP_printk(
		"context=0x%llx card_index=%u completed=%u cause=%s",
		__entry->context,
		__entry->card_index,
		__entry->completed,
		show_cause(__entry->cause)
	)
);

#undef QUADLET_SIZE

#endif // _FIREWIRE_TRACE_EVENT_H

#include <trace/define_trace.h>

Filemanager

Name Type Size Permission Actions
9p.h File 6.19 KB 0644
afs.h File 56.82 KB 0644
alarmtimer.h File 2.04 KB 0644
amdxdna.h File 2.72 KB 0644
asoc.h File 5.39 KB 0644
avc.h File 1.23 KB 0644
bcache.h File 11.44 KB 0644
block.h File 15.84 KB 0644
bpf_test_run.h File 1.23 KB 0644
bridge.h File 4.59 KB 0644
btrfs.h File 70.77 KB 0644
cachefiles.h File 23.19 KB 0644
capability.h File 1.67 KB 0644
cgroup.h File 6.26 KB 0644
clk.h File 5.96 KB 0644
cma.h File 2.71 KB 0644
compaction.h File 7.73 KB 0644
context_tracking.h File 1.15 KB 0644
cpuhp.h File 1.83 KB 0644
csd.h File 1.49 KB 0644
damon.h File 2.23 KB 0644
devfreq.h File 1.87 KB 0644
devlink.h File 6.46 KB 0644
dlm.h File 20.27 KB 0644
dma.h File 13.16 KB 0644
dma_fence.h File 1.59 KB 0644
erofs.h File 5.25 KB 0644
error_report.h File 2.06 KB 0644
ext4.h File 75.18 KB 0644
f2fs.h File 58.55 KB 0644
fib.h File 2.52 KB 0644
fib6.h File 2.49 KB 0644
filelock.h File 7.28 KB 0644
filemap.h File 4.56 KB 0644
firewire.h File 30.85 KB 0644
firewire_ohci.h File 3.41 KB 0644
fs_dax.h File 8.27 KB 0644
fscache.h File 14.27 KB 0644
fsi.h File 5.58 KB 0644
fsi_master_aspeed.h File 2.28 KB 0644
fsi_master_ast_cf.h File 3.67 KB 0644
fsi_master_gpio.h File 3.92 KB 0644
fsi_master_i2cr.h File 3.17 KB 0644
gpio.h File 1.07 KB 0644
gpu_mem.h File 1.21 KB 0644
habanalabs.h File 5.77 KB 0644
handshake.h File 8.21 KB 0644
host1x.h File 5.54 KB 0644
huge_memory.h File 6.54 KB 0644
hugetlbfs.h File 3.73 KB 0644
hw_pressure.h File 698 B 0644
hwmon.h File 1.43 KB 0644
i2c.h File 3.95 KB 0644
i2c_slave.h File 1.84 KB 0644
ib_mad.h File 12.42 KB 0644
ib_umad.h File 4 KB 0644
icmp.h File 1.54 KB 0644
initcall.h File 1.27 KB 0644
intel-sst.h File 2.51 KB 0644
intel_ifs.h File 1.39 KB 0644
intel_ish.h File 547 B 0644
io_uring.h File 16.45 KB 0644
iocost.h File 6.14 KB 0644
iommu.h File 2.95 KB 0644
ipi.h File 2.85 KB 0644
irq.h File 4.7 KB 0644
irq_matrix.h File 4.94 KB 0644
iscsi.h File 2.24 KB 0644
jbd2.h File 12.6 KB 0644
kmem.h File 9.57 KB 0644
ksm.h File 6.02 KB 0644
kvm.h File 11.77 KB 0644
kyber.h File 2.27 KB 0644
libata.h File 23.72 KB 0644
lock.h File 2.76 KB 0644
maple_tree.h File 2.69 KB 0644
mce.h File 2.53 KB 0644
mctp.h File 1.77 KB 0644
mdio.h File 1.02 KB 0644
memcg.h File 2.21 KB 0644
migrate.h File 3.74 KB 0644
mlxsw.h File 2.62 KB 0644
mmap.h File 2.72 KB 0644
mmap_lock.h File 1.69 KB 0644
mmc.h File 7.2 KB 0644
mmflags.h File 9.88 KB 0644
module.h File 2.75 KB 0644
mptcp.h File 4.71 KB 0644
napi.h File 1.9 KB 0644
nbd.h File 2.14 KB 0644
neigh.h File 6.86 KB 0644
net.h File 7.71 KB 0644
net_probe_common.h File 3.26 KB 0644
netfs.h File 24.34 KB 0644
netlink.h File 485 B 0644
nilfs2.h File 5.34 KB 0644
nmi.h File 780 B 0644
notifier.h File 1.07 KB 0644
objagg.h File 4.58 KB 0644
oom.h File 4.95 KB 0644
osnoise.h File 2.93 KB 0644
page_isolation.h File 943 B 0644
page_pool.h File 2.76 KB 0644
page_ref.h File 2.98 KB 0644
pagemap.h File 2.14 KB 0644
percpu.h File 3.11 KB 0644
power.h File 11.3 KB 0644
power_cpu_migrate.h File 1.59 KB 0644
preemptirq.h File 1.8 KB 0644
printk.h File 786 B 0644
pwc.h File 1.63 KB 0644
pwm.h File 3.85 KB 0644
qdisc.h File 3.73 KB 0644
qla.h File 905 B 0644
qrtr.h File 2.53 KB 0644
rcu.h File 24.74 KB 0644
rdma_core.h File 7.02 KB 0644
regulator.h File 2.81 KB 0644
rpcgss.h File 14.58 KB 0644
rpcrdma.h File 50.19 KB 0644
rpm.h File 3.35 KB 0644
rseq.h File 1.45 KB 0644
rtc.h File 3.28 KB 0644
rust_sample.h File 683 B 0644
rwmmio.h File 2.67 KB 0644
rxrpc.h File 79.53 KB 0644
sched.h File 20.02 KB 0644
sched_ext.h File 536 B 0644
scmi.h File 4.63 KB 0644
scsi.h File 11.84 KB 0644
sctp.h File 2.38 KB 0644
signal.h File 3.4 KB 0644
siox.h File 1.99 KB 0644
skb.h File 2.04 KB 0644
smbus.h File 7.33 KB 0644
sock.h File 7.56 KB 0644
sof.h File 3.16 KB 0644
sof_intel.h File 3.87 KB 0644
spi.h File 5.86 KB 0644
spmi.h File 3.24 KB 0644
sunrpc.h File 59.37 KB 0644
sunvnet.h File 3.06 KB 0644
swiotlb.h File 1.01 KB 0644
syscalls.h File 1.48 KB 0644
target.h File 7.62 KB 0644
task.h File 2.27 KB 0644
tcp.h File 18.68 KB 0644
tegra_apb_dma.h File 1.52 KB 0644
thp.h File 2.48 KB 0644
timer.h File 10.88 KB 0644
timer_migration.h File 6.86 KB 0644
timestamp.h File 2.92 KB 0644
tlb.h File 1.41 KB 0644
udp.h File 1.25 KB 0644
v4l2.h File 8.81 KB 0644
vb2.h File 1.73 KB 0644
vmalloc.h File 3.2 KB 0644
vmscan.h File 13.92 KB 0644
vsock_virtio_transport_common.h File 3.71 KB 0644
watchdog.h File 1.45 KB 0644
wbt.h File 3.82 KB 0644
workqueue.h File 2.98 KB 0644
writeback.h File 22.52 KB 0644
xdp.h File 10.05 KB 0644
xen.h File 13.9 KB 0644
Filemanager