STRUCT TMC_DRVDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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, otherwise NULL. 🫧
  • base β€” memory mapped base address for this component. πŸ“
  • csdev β€” component vitals needed by the framework. πŸ«€
  • miscdev β€” specifics to handle the /dev/xyz.tmc entry. 🎟️
  • crashdev β€” specifics to handle the /dev/crash_tmc_xyz entry 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.tmc entry 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 type tmc_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 β€” holds etr_bufs allocated for this ETR. πŸ—‚οΈ
  • idr_mutex β€” access serialisation for idr. πŸ”
  • 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 when ETR_MODE_RESRV buffer 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