drivers/greybus/greybus_trace.h
Source file repositories/reference/linux-study-clean/drivers/greybus/greybus_trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/greybus/greybus_trace.h- Extension
.h- Size
- 12381 bytes
- Lines
- 503
- Domain
- Driver Families
- Bucket
- drivers/greybus
- 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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.htrace/define_trace.h
Detected Declarations
struct gb_messagestruct gb_operationstruct gb_connectionstruct gb_bundlestruct gb_host_device
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM greybus
#if !defined(_TRACE_GREYBUS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_GREYBUS_H
#include <linux/tracepoint.h>
struct gb_message;
struct gb_operation;
struct gb_connection;
struct gb_bundle;
struct gb_host_device;
DECLARE_EVENT_CLASS(gb_message,
TP_PROTO(struct gb_message *message),
TP_ARGS(message),
TP_STRUCT__entry(
__field(u16, size)
__field(u16, operation_id)
__field(u8, type)
__field(u8, result)
),
TP_fast_assign(
__entry->size = le16_to_cpu(message->header->size);
__entry->operation_id =
le16_to_cpu(message->header->operation_id);
__entry->type = message->header->type;
__entry->result = message->header->result;
),
TP_printk("size=%u operation_id=0x%04x type=0x%02x result=0x%02x",
__entry->size, __entry->operation_id,
__entry->type, __entry->result)
);
#define DEFINE_MESSAGE_EVENT(name) \
DEFINE_EVENT(gb_message, name, \
TP_PROTO(struct gb_message *message), \
TP_ARGS(message))
/*
* Occurs immediately before calling a host device's message_send()
* method.
*/
DEFINE_MESSAGE_EVENT(gb_message_send);
/*
* Occurs after an incoming request message has been received
*/
DEFINE_MESSAGE_EVENT(gb_message_recv_request);
/*
* Occurs after an incoming response message has been received,
* after its matching request has been found.
*/
DEFINE_MESSAGE_EVENT(gb_message_recv_response);
/*
* Occurs after an operation has been canceled, possibly before the
* cancellation is complete.
*/
DEFINE_MESSAGE_EVENT(gb_message_cancel_outgoing);
/*
* Occurs when an incoming request is cancelled; if the response has
* been queued for sending, this occurs after it is sent.
*/
DEFINE_MESSAGE_EVENT(gb_message_cancel_incoming);
/*
* Occurs in the host driver message_send() function just prior to
* handing off the data to be processed by hardware.
*/
DEFINE_MESSAGE_EVENT(gb_message_submit);
#undef DEFINE_MESSAGE_EVENT
DECLARE_EVENT_CLASS(gb_operation,
TP_PROTO(struct gb_operation *operation),
TP_ARGS(operation),
TP_STRUCT__entry(
__field(u16, cport_id) /* CPort of HD side of connection */
Annotation
- Immediate include surface: `linux/tracepoint.h`, `trace/define_trace.h`.
- Detected declarations: `struct gb_message`, `struct gb_operation`, `struct gb_connection`, `struct gb_bundle`, `struct gb_host_device`.
- Atlas domain: Driver Families / drivers/greybus.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.