drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
Source file repositories/reference/linux-study-clean/drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/marvell/octeontx2/otx2_cpt_common.h- Extension
.h- Size
- 5467 bytes
- Lines
- 214
- 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/pci.hlinux/types.hlinux/module.hlinux/delay.hlinux/crypto.hnet/devlink.hotx2_cpt_hw_types.hrvu.hmbox.h
Detected Declarations
struct otx2_cpt_rx_inline_lf_cfgstruct otx2_cpt_egrp_num_msgstruct otx2_cpt_egrp_num_rspstruct otx2_cpt_kvf_limits_msgstruct otx2_cpt_kvf_limits_rspstruct otx2_cpt_caps_msgstruct otx2_cpt_caps_rspstruct otx2_cptlfs_infoenum otx2_cpt_eng_typefunction otx2_cpt_write64function otx2_cpt_read64function is_dev_otx2function is_dev_cn10kafunction is_dev_cn10ka_axfunction is_dev_cn10kbfunction is_dev_cn10ka_b0function otx2_cpt_set_hw_capsfunction cpt_is_errata_38550_existsfunction cpt_feature_sgv2
Annotated Snippet
struct otx2_cpt_rx_inline_lf_cfg {
struct mbox_msghdr hdr;
u16 sso_pf_func;
u16 param1;
u16 param2;
u16 opcode;
u32 credit;
u32 credit_th;
u16 bpid;
u32 reserved;
u8 ctx_ilen_valid : 1;
u8 ctx_ilen : 7;
};
/*
* Message request and response to get engine group number
* which has attached a given type of engines (SE, AE, IE)
* This messages are only used between CPT PF <=> CPT VF
*/
struct otx2_cpt_egrp_num_msg {
struct mbox_msghdr hdr;
u8 eng_type;
};
struct otx2_cpt_egrp_num_rsp {
struct mbox_msghdr hdr;
u8 eng_type;
u8 eng_grp_num;
};
/*
* Message request and response to get kernel crypto limits
* This messages are only used between CPT PF <-> CPT VF
*/
struct otx2_cpt_kvf_limits_msg {
struct mbox_msghdr hdr;
};
struct otx2_cpt_kvf_limits_rsp {
struct mbox_msghdr hdr;
u8 kvf_limits;
};
/* CPT HW capabilities */
union otx2_cpt_eng_caps {
u64 u;
struct {
u64 reserved_0_4:5;
u64 mul:1;
u64 sha1_sha2:1;
u64 chacha20:1;
u64 zuc_snow3g:1;
u64 sha3:1;
u64 aes:1;
u64 kasumi:1;
u64 des:1;
u64 crc:1;
u64 mmul:1;
u64 reserved_15_33:19;
u64 pdcp_chain:1;
u64 reserved_35_63:29;
};
};
/*
* Message request and response to get HW capabilities for each
* engine type (SE, IE, AE).
* This messages are only used between CPT PF <=> CPT VF
*/
struct otx2_cpt_caps_msg {
struct mbox_msghdr hdr;
};
struct otx2_cpt_caps_rsp {
struct mbox_msghdr hdr;
u16 cpt_pf_drv_version;
u8 cpt_revision;
union otx2_cpt_eng_caps eng_caps[OTX2_CPT_MAX_ENG_TYPES];
};
static inline void otx2_cpt_write64(void __iomem *reg_base, u64 blk, u64 slot,
u64 offs, u64 val)
{
writeq_relaxed(val, reg_base +
OTX2_CPT_RVU_FUNC_ADDR_S(blk, slot, offs));
}
static inline u64 otx2_cpt_read64(void __iomem *reg_base, u64 blk, u64 slot,
u64 offs)
{
Annotation
- Immediate include surface: `linux/pci.h`, `linux/types.h`, `linux/module.h`, `linux/delay.h`, `linux/crypto.h`, `net/devlink.h`, `otx2_cpt_hw_types.h`, `rvu.h`.
- Detected declarations: `struct otx2_cpt_rx_inline_lf_cfg`, `struct otx2_cpt_egrp_num_msg`, `struct otx2_cpt_egrp_num_rsp`, `struct otx2_cpt_kvf_limits_msg`, `struct otx2_cpt_kvf_limits_rsp`, `struct otx2_cpt_caps_msg`, `struct otx2_cpt_caps_rsp`, `struct otx2_cptlfs_info`, `enum otx2_cpt_eng_type`, `function otx2_cpt_write64`.
- 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.