drivers/vdpa/octeon_ep/octep_vdpa_main.c
Source file repositories/reference/linux-study-clean/drivers/vdpa/octeon_ep/octep_vdpa_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/vdpa/octeon_ep/octep_vdpa_main.c- Extension
.c- Size
- 26324 bytes
- Lines
- 996
- Domain
- Driver Families
- Bucket
- drivers/vdpa
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/interrupt.hlinux/io-64-nonatomic-lo-hi.hlinux/module.hlinux/iommu.hoctep_vdpa.h
Detected Declarations
struct octep_pfstruct octep_vdpa_event_wkstruct octep_vdpastruct octep_vdpa_mgmt_devfunction octep_vdpa_dev_event_schedulefunction octep_vdpa_dev_event_handlerfunction octep_vdpa_intr_handlerfunction octep_free_irqsfunction octep_request_irqsfunction octep_vdpa_get_device_featuresfunction octep_vdpa_set_driver_featuresfunction octep_vdpa_get_driver_featuresfunction octep_vdpa_get_statusfunction octep_vdpa_set_statusfunction octep_vdpa_resetfunction octep_vdpa_get_vq_num_maxfunction octep_vdpa_get_vq_statefunction octep_vdpa_set_vq_statefunction octep_vdpa_set_vq_cbfunction octep_vdpa_set_vq_readyfunction octep_vdpa_get_vq_readyfunction octep_vdpa_set_vq_numfunction octep_vdpa_set_vq_addressfunction octep_vdpa_kick_vqfunction octep_vdpa_get_generationfunction octep_vdpa_get_device_idfunction octep_vdpa_get_vendor_idfunction octep_vdpa_get_vq_alignfunction octep_vdpa_get_config_sizefunction octep_vdpa_get_configfunction octep_vdpa_set_configfunction octep_get_vq_notificationfunction octep_iomap_regionfunction octep_iounmap_regionfunction octep_vdpa_pf_bar_shrinkfunction octep_vdpa_pf_bar_expandfunction octep_vdpa_remove_pffunction octep_vdpa_vf_bar_shrinkfunction octep_vdpa_remove_vffunction octep_vdpa_removefunction octep_vdpa_dev_addfunction octep_vdpa_dev_delfunction get_device_ready_statusfunction octep_event_workfunction octep_vdpa_setup_taskfunction octep_vdpa_probe_vffunction octep_vdpa_assign_barspacefunction octep_sriov_enable
Annotated Snippet
static struct pci_driver octep_pci_vdpa = {
.name = OCTEP_VDPA_DRIVER_NAME,
.id_table = octep_pci_vdpa_map,
.probe = octep_vdpa_probe,
.remove = octep_vdpa_remove,
.sriov_configure = octep_vdpa_sriov_configure
};
module_pci_driver(octep_pci_vdpa);
MODULE_AUTHOR("Marvell");
MODULE_DESCRIPTION("Marvell Octeon PCIe endpoint vDPA driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/interrupt.h`, `linux/io-64-nonatomic-lo-hi.h`, `linux/module.h`, `linux/iommu.h`, `octep_vdpa.h`.
- Detected declarations: `struct octep_pf`, `struct octep_vdpa_event_wk`, `struct octep_vdpa`, `struct octep_vdpa_mgmt_dev`, `function octep_vdpa_dev_event_schedule`, `function octep_vdpa_dev_event_handler`, `function octep_vdpa_intr_handler`, `function octep_free_irqs`, `function octep_request_irqs`, `function octep_vdpa_get_device_features`.
- Atlas domain: Driver Families / drivers/vdpa.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.