drivers/rpmsg/qcom_glink_trace.h

Source file repositories/reference/linux-study-clean/drivers/rpmsg/qcom_glink_trace.h

File Facts

System
Linux kernel
Corpus path
drivers/rpmsg/qcom_glink_trace.h
Extension
.h
Size
11703 bytes
Lines
407
Domain
Driver Families
Bucket
drivers/rpmsg
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#undef TRACE_SYSTEM
#define TRACE_SYSTEM qcom_glink

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

#include <linux/tracepoint.h>
#include "qcom_glink_native.h"


TRACE_EVENT(qcom_glink_cmd_version,
	TP_PROTO(const char *remote, unsigned int version, unsigned int features, bool tx),
	TP_ARGS(remote, version, features, tx),
	TP_STRUCT__entry(
		__string(remote, remote)
		__field(u32, version)
		__field(u32, features)
		__field(bool, tx)
	),
	TP_fast_assign(
		__assign_str(remote);
		__entry->version = version;
		__entry->features = features;
		__entry->tx = tx;
	),
	TP_printk("%s remote: %s version: %u features: %#x",
		  __entry->tx ? "tx" : "rx",
		  __get_str(remote),
		  __entry->version,
		  __entry->features
	)
);
#define trace_qcom_glink_cmd_version_tx(...) trace_qcom_glink_cmd_version(__VA_ARGS__, true)
#define trace_qcom_glink_cmd_version_rx(...) trace_qcom_glink_cmd_version(__VA_ARGS__, false)

TRACE_EVENT(qcom_glink_cmd_version_ack,
	TP_PROTO(const char *remote, unsigned int version, unsigned int features, bool tx),
	TP_ARGS(remote, version, features, tx),
	TP_STRUCT__entry(
		__string(remote, remote)
		__field(u32, version)
		__field(u32, features)
		__field(bool, tx)
	),
	TP_fast_assign(
		__assign_str(remote);
		__entry->version = version;
		__entry->features = features;
		__entry->tx = tx;
	),
	TP_printk("%s remote: %s version: %u features: %#x",
		  __entry->tx ? "tx" : "rx",
		  __get_str(remote),
		  __entry->version,
		  __entry->features
	)
);
#define trace_qcom_glink_cmd_version_ack_tx(...) trace_qcom_glink_cmd_version_ack(__VA_ARGS__, true)
#define trace_qcom_glink_cmd_version_ack_rx(...) trace_qcom_glink_cmd_version_ack(__VA_ARGS__, false)

TRACE_EVENT(qcom_glink_cmd_open,
	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool tx),
	TP_ARGS(remote, channel, lcid, rcid, tx),
	TP_STRUCT__entry(
		__string(remote, remote)
		__string(channel, channel)
		__field(u16, lcid)
		__field(u16, rcid)
		__field(bool, tx)
	),
	TP_fast_assign(
		__assign_str(remote);
		__assign_str(channel);
		__entry->lcid = lcid;
		__entry->rcid = rcid;
		__entry->tx = tx;
	),
	TP_printk("%s remote: %s channel: %s[%u/%u]",
		  __entry->tx ? "tx" : "rx",
		  __get_str(remote),
		  __get_str(channel),
		  __entry->lcid,
		  __entry->rcid
	)
);
#define trace_qcom_glink_cmd_open_tx(...) trace_qcom_glink_cmd_open(__VA_ARGS__, true)
#define trace_qcom_glink_cmd_open_rx(...) trace_qcom_glink_cmd_open(__VA_ARGS__, false)

TRACE_EVENT(qcom_glink_cmd_close,
	TP_PROTO(const char *remote, const char *channel, u16 lcid, u16 rcid, bool tx),

Annotation

Implementation Notes