drivers/vdpa/octeon_ep/octep_vdpa.h
Source file repositories/reference/linux-study-clean/drivers/vdpa/octeon_ep/octep_vdpa.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/vdpa/octeon_ep/octep_vdpa.h- Extension
.h- Size
- 4040 bytes
- Lines
- 135
- Domain
- Driver Families
- Bucket
- drivers/vdpa
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pci.hlinux/pci_regs.hlinux/vdpa.hlinux/virtio_pci_modern.huapi/linux/virtio_crypto.huapi/linux/virtio_net.huapi/linux/virtio_blk.huapi/linux/virtio_config.huapi/linux/virtio_pci.huapi/linux/vdpa.h
Detected Declarations
struct octep_vring_infostruct octep_pci_vndr_datastruct octep_hwenum octep_vdpa_dev_statusenum octep_vdpa_dev_event_stateenum octep_vdpa_dev_eventenum octep_pci_vndr_cfg_type
Annotated Snippet
struct octep_vring_info {
struct vdpa_callback cb;
void __iomem *notify_addr;
void __iomem *cb_notify_addr;
phys_addr_t notify_pa;
};
enum octep_pci_vndr_cfg_type {
OCTEP_PCI_VNDR_CFG_TYPE_VIRTIO_ID,
OCTEP_PCI_VNDR_CFG_TYPE_MAX,
};
struct octep_pci_vndr_data {
struct virtio_pci_vndr_data hdr;
u8 id;
u8 bar;
union {
u64 data;
struct {
u32 offset;
u32 length;
};
};
};
struct octep_hw {
struct pci_dev *pdev;
u8 __iomem *base[PCI_STD_NUM_BARS];
struct virtio_pci_common_cfg __iomem *common_cfg;
u8 __iomem *dev_cfg;
u8 __iomem *isr;
void __iomem *notify_base;
phys_addr_t notify_base_pa;
u32 notify_off_multiplier;
u8 notify_bar;
struct octep_vring_info *vqs;
struct vdpa_callback config_cb;
u64 features;
u16 nr_vring;
u32 config_size;
int requested_irqs;
int nb_irqs;
int *irqs;
u8 dev_id;
};
u8 octep_hw_get_status(struct octep_hw *oct_hw);
void octep_hw_set_status(struct octep_hw *dev, uint8_t status);
void octep_hw_reset(struct octep_hw *oct_hw);
void octep_write_queue_select(struct octep_hw *oct_hw, u16 queue_id);
void octep_notify_queue(struct octep_hw *oct_hw, u16 qid);
void octep_read_dev_config(struct octep_hw *oct_hw, u64 offset, void *dst, int length);
int octep_set_vq_address(struct octep_hw *oct_hw, u16 qid, u64 desc_area, u64 driver_area,
u64 device_area);
void octep_set_vq_num(struct octep_hw *oct_hw, u16 qid, u32 num);
void octep_set_vq_ready(struct octep_hw *oct_hw, u16 qid, bool ready);
bool octep_get_vq_ready(struct octep_hw *oct_hw, u16 qid);
int octep_set_vq_state(struct octep_hw *oct_hw, u16 qid, const struct vdpa_vq_state *state);
int octep_get_vq_state(struct octep_hw *oct_hw, u16 qid, struct vdpa_vq_state *state);
u16 octep_get_vq_size(struct octep_hw *oct_hw);
int octep_hw_caps_read(struct octep_hw *oct_hw, struct pci_dev *pdev);
u64 octep_hw_get_dev_features(struct octep_hw *oct_hw);
void octep_hw_set_drv_features(struct octep_hw *oct_hw, u64 features);
u64 octep_hw_get_drv_features(struct octep_hw *oct_hw);
int octep_verify_features(u64 features);
#endif /* __OCTEP_VDPA_H__ */
Annotation
- Immediate include surface: `linux/pci.h`, `linux/pci_regs.h`, `linux/vdpa.h`, `linux/virtio_pci_modern.h`, `uapi/linux/virtio_crypto.h`, `uapi/linux/virtio_net.h`, `uapi/linux/virtio_blk.h`, `uapi/linux/virtio_config.h`.
- Detected declarations: `struct octep_vring_info`, `struct octep_pci_vndr_data`, `struct octep_hw`, `enum octep_vdpa_dev_status`, `enum octep_vdpa_dev_event_state`, `enum octep_vdpa_dev_event`, `enum octep_pci_vndr_cfg_type`.
- Atlas domain: Driver Families / drivers/vdpa.
- Implementation status: source 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.