drivers/crypto/intel/qat/qat_common/adf_gen4_tl.c
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/adf_gen4_tl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_common/adf_gen4_tl.c- Extension
.c- Size
- 6254 bytes
- Lines
- 155
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/kernel.hadf_gen4_tl.hadf_telemetry.hadf_tl_debugfs.h
Detected Declarations
function adf_gen4_init_tl_dataexport adf_gen4_init_tl_data
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2023 Intel Corporation. */
#include <linux/export.h>
#include <linux/kernel.h>
#include "adf_gen4_tl.h"
#include "adf_telemetry.h"
#include "adf_tl_debugfs.h"
#define ADF_GEN4_TL_DEV_REG_OFF(reg) ADF_TL_DEV_REG_OFF(reg, gen4)
#define ADF_GEN4_TL_RP_REG_OFF(reg) ADF_TL_RP_REG_OFF(reg, gen4)
#define ADF_GEN4_TL_SL_UTIL_COUNTER(_name) \
ADF_TL_COUNTER("util_" #_name, \
ADF_TL_SIMPLE_COUNT, \
ADF_TL_SLICE_REG_OFF(_name, reg_tm_slice_util, gen4))
#define ADF_GEN4_TL_SL_EXEC_COUNTER(_name) \
ADF_TL_COUNTER("exec_" #_name, \
ADF_TL_SIMPLE_COUNT, \
ADF_TL_SLICE_REG_OFF(_name, reg_tm_slice_exec_cnt, gen4))
/* Device level counters. */
static const struct adf_tl_dbg_counter dev_counters[] = {
/* PCIe partial transactions. */
ADF_TL_COUNTER(PCI_TRANS_CNT_NAME, ADF_TL_SIMPLE_COUNT,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_pci_trans_cnt)),
/* Max read latency[ns]. */
ADF_TL_COUNTER(MAX_RD_LAT_NAME, ADF_TL_COUNTER_NS,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_rd_lat_max)),
/* Read latency average[ns]. */
ADF_TL_COUNTER_LATENCY(RD_LAT_ACC_NAME, ADF_TL_COUNTER_NS_AVG,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_rd_lat_acc),
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_rd_cmpl_cnt)),
/* Max get to put latency[ns]. */
ADF_TL_COUNTER(MAX_LAT_NAME, ADF_TL_COUNTER_NS,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_gp_lat_max)),
/* Get to put latency average[ns]. */
ADF_TL_COUNTER_LATENCY(LAT_ACC_NAME, ADF_TL_COUNTER_NS_AVG,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_gp_lat_acc),
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_ae_put_cnt)),
/* PCIe write bandwidth[Mbps]. */
ADF_TL_COUNTER(BW_IN_NAME, ADF_TL_COUNTER_MBPS,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_bw_in)),
/* PCIe read bandwidth[Mbps]. */
ADF_TL_COUNTER(BW_OUT_NAME, ADF_TL_COUNTER_MBPS,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_bw_out)),
/* Page request latency average[ns]. */
ADF_TL_COUNTER_LATENCY(PAGE_REQ_LAT_NAME, ADF_TL_COUNTER_NS_AVG,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_at_page_req_lat_acc),
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_at_page_req_cnt)),
/* Page translation latency average[ns]. */
ADF_TL_COUNTER_LATENCY(AT_TRANS_LAT_NAME, ADF_TL_COUNTER_NS_AVG,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_at_trans_lat_acc),
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_at_trans_lat_cnt)),
/* Maximum uTLB used. */
ADF_TL_COUNTER(AT_MAX_UTLB_USED_NAME, ADF_TL_SIMPLE_COUNT,
ADF_GEN4_TL_DEV_REG_OFF(reg_tl_at_max_tlb_used)),
};
/* Slice utilization counters. */
static const struct adf_tl_dbg_counter sl_util_counters[ADF_TL_SL_CNT_COUNT] = {
/* Compression slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(cpr),
/* Translator slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(xlt),
/* Decompression slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(dcpr),
/* PKE utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(pke),
/* Wireless Authentication slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(wat),
/* Wireless Cipher slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(wcp),
/* UCS slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(ucs),
/* Cipher slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(cph),
/* Authentication slice utilization. */
ADF_GEN4_TL_SL_UTIL_COUNTER(ath),
};
/* Slice execution counters. */
static const struct adf_tl_dbg_counter sl_exec_counters[ADF_TL_SL_CNT_COUNT] = {
/* Compression slice execution count. */
ADF_GEN4_TL_SL_EXEC_COUNTER(cpr),
/* Translator slice execution count. */
ADF_GEN4_TL_SL_EXEC_COUNTER(xlt),
/* Decompression slice execution count. */
Annotation
- Immediate include surface: `linux/export.h`, `linux/kernel.h`, `adf_gen4_tl.h`, `adf_telemetry.h`, `adf_tl_debugfs.h`.
- Detected declarations: `function adf_gen4_init_tl_data`, `export adf_gen4_init_tl_data`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: integration implementation candidate.
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.