drivers/crypto/intel/qat/qat_6xxx/adf_6xxx_hw_data.c
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_6xxx/adf_6xxx_hw_data.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_6xxx/adf_6xxx_hw_data.c- Extension
.c- Size
- 31814 bytes
- Lines
- 1086
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bitfield.hlinux/bitops.hlinux/bits.hlinux/iopoll.hlinux/pci.hlinux/types.hadf_accel_devices.hadf_admin.hadf_bank_state.hadf_cfg.hadf_cfg_services.hadf_clock.hadf_common_drv.hadf_fw_config.hadf_gen6_pm.hadf_gen6_ras.hadf_gen6_shared.hadf_gen6_tl.hadf_timer.hadf_6xxx_hw_data.hicp_qat_fw_comp.hicp_qat_hw_51_comp.h
Detected Declarations
struct adf_ring_configenum adf_gen6_rpsfunction services_supportedfunction wcy_services_supportedfunction get_servicefunction get_ring_typefunction get_rp_configfunction adf_gen6_get_arb_maskfunction get_ring_to_svc_mapfunction get_accel_maskfunction get_num_accelsfunction get_num_aesfunction get_misc_bar_idfunction get_etr_bar_idfunction get_sram_bar_idfunction get_skufunction get_arb_infofunction get_admin_infofunction get_heartbeat_clockfunction enable_error_correctionfunction enable_intsfunction set_ssm_wdtimerfunction set_msix_default_rttablefunction reset_ring_pairfunction adf_anti_rb_enabledfunction adf_gen6_init_anti_rbfunction ring_pair_resetfunction build_comp_blockfunction build_decomp_blockfunction adf_gen6_init_dc_opsfunction adf_gen6_init_thd2arb_mapfunction init_num_svc_aesfunction adf_gen6_get_svc_slice_cntfunction set_vc_csr_for_bankfunction set_vc_configfunction adf_gen6_set_vcfunction get_ae_maskfunction get_accel_cap_wcyfunction get_accel_capfunction uof_get_num_objsfunction uof_get_obj_typefunction uof_get_ae_maskfunction adf_init_devicefunction enable_pmfunction dev_configfunction adf_gen6_init_kptfunction adf_gen6_init_rl_datafunction adf_gen6_init_services_supported
Annotated Snippet
struct adf_ring_config {
u32 ring_mask;
enum adf_cfg_service_type ring_type;
const unsigned long *thrd_mask;
};
static u32 rmask_two_services[] = {
RP_GROUP_0_MASK,
RP_GROUP_1_MASK,
};
enum adf_gen6_rps {
RP0 = 0,
RP1 = 1,
RP2 = 2,
RP3 = 3,
RP_MAX = RP3
};
/*
* thrd_mask_[sym|asym|cpr|dcc]: these static arrays define the thread
* configuration for handling requests of specific services across the
* accelerator engines. Each element in an array corresponds to an
* accelerator engine, with the value being a bitmask that specifies which
* threads within that engine are capable of processing the particular service.
*
* For example, a value of 0x0C means that threads 2 and 3 are enabled for the
* service in the respective accelerator engine.
*/
static const unsigned long thrd_mask_sym[ADF_6XXX_MAX_ACCELENGINES] = {
0x0C, 0x0C, 0x0C, 0x0C, 0x1C, 0x1C, 0x1C, 0x1C, 0x00
};
static const unsigned long thrd_mask_asym[ADF_6XXX_MAX_ACCELENGINES] = {
0x70, 0x70, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x00
};
static const unsigned long thrd_mask_cpr[ADF_6XXX_MAX_ACCELENGINES] = {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00
};
static const unsigned long thrd_mask_dcc[ADF_6XXX_MAX_ACCELENGINES] = {
0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x03, 0x03, 0x00
};
static const unsigned long thrd_mask_dcpr[ADF_6XXX_MAX_ACCELENGINES] = {
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00
};
static const unsigned long thrd_mask_wcy[ADF_6XXX_MAX_ACCELENGINES] = {
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x00
};
static const char *const adf_6xxx_fw_objs[] = {
[ADF_FW_CY_OBJ] = ADF_6XXX_CY_OBJ,
[ADF_FW_DC_OBJ] = ADF_6XXX_DC_OBJ,
[ADF_FW_ADMIN_OBJ] = ADF_6XXX_ADMIN_OBJ,
[ADF_FW_WCY_OBJ] = ADF_6XXX_WCY_OBJ,
};
static const struct adf_fw_config adf_default_fw_config[] = {
{ ADF_AE_GROUP_1, ADF_FW_DC_OBJ },
{ ADF_AE_GROUP_0, ADF_FW_CY_OBJ },
{ ADF_AE_GROUP_2, ADF_FW_ADMIN_OBJ },
};
static const struct adf_fw_config adf_wcy_fw_config[] = {
{ ADF_AE_GROUP_1, ADF_FW_WCY_OBJ },
{ ADF_AE_GROUP_0, ADF_FW_WCY_OBJ },
{ ADF_AE_GROUP_2, ADF_FW_ADMIN_OBJ },
};
static struct adf_hw_device_class adf_6xxx_class = {
.name = ADF_6XXX_DEVICE_NAME,
.type = DEV_6XXX,
};
static bool services_supported(unsigned long mask)
{
int num_svc;
if (mask >= BIT(SVC_COUNT))
return false;
num_svc = hweight_long(mask);
switch (num_svc) {
case ADF_ONE_SERVICE:
return true;
case ADF_TWO_SERVICES:
case ADF_THREE_SERVICES:
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bitfield.h`, `linux/bitops.h`, `linux/bits.h`, `linux/iopoll.h`, `linux/pci.h`, `linux/types.h`, `adf_accel_devices.h`.
- Detected declarations: `struct adf_ring_config`, `enum adf_gen6_rps`, `function services_supported`, `function wcy_services_supported`, `function get_service`, `function get_ring_type`, `function get_rp_config`, `function adf_gen6_get_arb_mask`, `function get_ring_to_svc_map`, `function get_accel_mask`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.