STRUCT TMC_DRVDATA(9)
π struct tmc_drvdata π
Okay bestie, welcome to the Kernel API Manual page for struct tmc_drvdata(9). This is the struct that holds the specifics associated to an TMC component β literally the little data homebase for a TMC component. π
π NAME π
struct tmc_drvdata β specifics associated to an TMC component. β¨
π¦ SYNOPSIS π¦
struct tmc_drvdata {
struct clk *atclk;
struct clk *pclk;
void __iomem *base;
struct coresight_device *csdev;
struct miscdevice miscdev;
struct miscdevice crashdev;
raw_spinlock_t spinlock;
pid_t pid;
bool reading;
bool stop_on_flush;
union {
char *buf;
struct etr_buf *etr_buf;
};
u32 len;
u32 size;
u32 max_burst_size;
enum tmc_config_type config_type;
enum tmc_mem_intf_width memwidth;
u32 trigger_cntr;
u32 etr_caps;
enum etr_mode etr_mode;
struct idr idr;
struct mutex idr_mutex;
struct etr_buf *sysfs_buf;
struct etr_buf *perf_buf;
struct tmc_resrv_buf resrv_buf;
struct tmc_resrv_buf crash_mdata;
};
π«Ά Members π«Ά
atclkβ optional clock for the core parts of the TMC. π°οΈpclkβ APB clock if present, otherwiseNULL. π«§baseβ memory mapped base address for this component. πcsdevβ component vitals needed by the framework. π«miscdevβ specifics to handle the/dev/xyz.tmcentry. ποΈcrashdevβ specifics to handle the/dev/crash_tmc_xyzentry for reading crash tracedata. π₯spinlockβ only one at a time pls. π ββοΈpidβ process ID of the process that owns the session that is using this component. For example, this would be the pid of the Perf process. π§readingβ says the buffer's in the reading-through-/dev/xyz.tmcentry state. πstop_on_flushβ stop on flush trigger user configuration. π{unnamed_union}β anonymous. π«₯bufβ snapshot of the trace data for ETF/ETB. πΈetr_bufβ details of the buffer used in TMC-ETR. π§Ύ
lenβ size of the available trace for ETF/ETB. πsizeβ trace buffer size for this TMC (common for all modes). π¦max_burst_sizeβ the maximum burst size that can be initiated by TMC-ETR on the AXI bus. πconfig_typeβ TMC variant, must be of typetmc_config_type. π·οΈmemwidthβ width of the memory interface databus, in bytes. πtrigger_cntrβ amount of words to store after a trigger. π―etr_capsβ bitmask of capabilities of the TMC ETR, inferred from the device configuration register (DEVID). π§¬etr_modeβ user preferred mode of the ETR device, default auto mode. ποΈidrβ holdsetr_bufsallocated for this ETR. ποΈidr_mutexβ access serialisation foridr. πsysfs_bufβ SYSFS buffer for ETR. ποΈperf_bufβ PERF buffer for ETR. πresrv_bufβ used by ETR as hardware trace buffer and for trace data retention (after crash) only whenETR_MODE_RESRVbuffer mode is enabled. Used by ETF for trace data retention (after crash) by default. πcrash_mdataβ reserved memory for storing tmc crash metadata. Used by ETR/ETF. π§·
π SEE ALSO π
Kernel file ./drivers/hwtracing/coresight/coresight-tmc.h, plus struct etr_buf(9) and struct tmc_pages(9). Go read those too, bestie. π
Mwah π this page comes from the Kernel API Manual, source ./drivers/hwtracing/coresight, dated October 2026, and it's all about struct tmc_drvdata(9). periodt. π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms