drivers/crypto/intel/qat/qat_common/adf_telemetry.h
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/adf_telemetry.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_common/adf_telemetry.h- Extension
.h- Size
- 2872 bytes
- Lines
- 106
- Domain
- Driver Families
- Bucket
- drivers/crypto
- 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/bits.hlinux/mutex.hlinux/types.hlinux/workqueue.hicp_qat_fw_init_admin.h
Detected Declarations
struct adf_accel_devstruct adf_tl_dbg_counterstruct dentrystruct adf_tl_hw_datastruct adf_telemetryfunction adf_tl_initfunction adf_tl_startfunction adf_tl_stop
Annotated Snippet
struct adf_tl_hw_data {
size_t layout_sz;
size_t slice_reg_sz;
size_t cmdq_reg_sz;
size_t rp_reg_sz;
size_t msg_cnt_off;
const struct adf_tl_dbg_counter *dev_counters;
const struct adf_tl_dbg_counter *sl_util_counters;
const struct adf_tl_dbg_counter *sl_exec_counters;
const struct adf_tl_dbg_counter **cmdq_counters;
const struct adf_tl_dbg_counter *rp_counters;
u8 num_hbuff;
u8 cpp_ns_per_cycle;
u8 bw_units_to_bytes;
u8 num_dev_counters;
u8 num_rp_counters;
u8 num_cmdq_counters;
u8 max_rp;
u8 max_sl_cnt;
struct icp_qat_fw_init_admin_slice_cnt multiplier;
};
struct adf_telemetry {
struct adf_accel_dev *accel_dev;
atomic_t state;
u32 hbuffs;
int hb_num;
u32 msg_cnt;
dma_addr_t regs_data_p; /* bus address for DMA mapping */
void *regs_data; /* virtual address for DMA mapping */
/**
* @regs_hist_buff: array of pointers to copies of the last @hbuffs
* values of @regs_data
*/
void **regs_hist_buff;
struct dentry *dbg_dir;
u8 *rp_num_indexes;
/**
* @regs_hist_lock: protects from race conditions between write and read
* to the copies referenced by @regs_hist_buff
*/
struct mutex regs_hist_lock;
/**
* @wr_lock: protects from concurrent writes to debugfs telemetry files
*/
struct mutex wr_lock;
struct delayed_work work_ctx;
struct icp_qat_fw_init_admin_slice_cnt slice_cnt;
struct icp_qat_fw_init_admin_slice_cnt cmdq_cnt;
};
#ifdef CONFIG_DEBUG_FS
int adf_tl_init(struct adf_accel_dev *accel_dev);
int adf_tl_start(struct adf_accel_dev *accel_dev);
void adf_tl_stop(struct adf_accel_dev *accel_dev);
void adf_tl_shutdown(struct adf_accel_dev *accel_dev);
int adf_tl_run(struct adf_accel_dev *accel_dev, int state);
int adf_tl_halt(struct adf_accel_dev *accel_dev);
#else
static inline int adf_tl_init(struct adf_accel_dev *accel_dev)
{
return 0;
}
static inline int adf_tl_start(struct adf_accel_dev *accel_dev)
{
return 0;
}
static inline void adf_tl_stop(struct adf_accel_dev *accel_dev)
{
}
static inline void adf_tl_shutdown(struct adf_accel_dev *accel_dev)
{
}
#endif /* CONFIG_DEBUG_FS */
#endif /* ADF_TELEMETRY_H */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/mutex.h`, `linux/types.h`, `linux/workqueue.h`, `icp_qat_fw_init_admin.h`.
- Detected declarations: `struct adf_accel_dev`, `struct adf_tl_dbg_counter`, `struct dentry`, `struct adf_tl_hw_data`, `struct adf_telemetry`, `function adf_tl_init`, `function adf_tl_start`, `function adf_tl_stop`.
- Atlas domain: Driver Families / drivers/crypto.
- 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.