drivers/nvme/target/pci-epf.c
Source file repositories/reference/linux-study-clean/drivers/nvme/target/pci-epf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/nvme/target/pci-epf.c- Extension
.c- Size
- 66510 bytes
- Lines
- 2649
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/delay.hlinux/dmaengine.hlinux/io.hlinux/mempool.hlinux/module.hlinux/mutex.hlinux/nvme.hlinux/pci_ids.hlinux/pci-epc.hlinux/pci-epf.hlinux/pci_regs.hlinux/slab.hnvmet.h
Detected Declarations
struct nvmet_pci_epf_irq_vectorstruct nvmet_pci_epf_queuestruct nvmet_pci_epf_segmentstruct nvmet_pci_epf_iodstruct nvmet_pci_epf_ctrlstruct nvmet_pci_epfstruct nvmet_pci_epf_dma_filterenum nvmet_pci_epf_queue_flagsfunction nvmet_pci_epf_bar_read32function nvmet_pci_epf_bar_write32function nvmet_pci_epf_bar_read64function nvmet_pci_epf_bar_write64function nvmet_pci_epf_mem_mapfunction nvmet_pci_epf_mem_unmapfunction nvmet_pci_epf_dma_filterfunction nvmet_pci_epf_init_dmafunction nvmet_pci_epf_deinit_dmafunction nvmet_pci_epf_dma_transferfunction nvmet_pci_epf_mmio_transferfunction nvmet_pci_epf_transfer_segfunction nvmet_pci_epf_transferfunction nvmet_pci_epf_alloc_irq_vectorsfunction nvmet_pci_epf_free_irq_vectorsfunction nvmet_pci_epf_find_irq_vectorfunction nvmet_pci_epf_add_irq_vectorfunction nvmet_pci_epf_remove_irq_vectorfunction nvmet_pci_epf_should_raise_irqfunction nvmet_pci_epf_raise_irqfunction nvmet_pci_epf_alloc_iodfunction nvmet_pci_epf_alloc_iod_data_segsfunction nvmet_pci_epf_free_iodfunction nvmet_pci_epf_transfer_iod_datafunction nvmet_pci_epf_prp_ofstfunction nvmet_pci_epf_prp_sizefunction nvmet_pci_epf_get_prp_listfunction nvmet_pci_epf_iod_parse_prp_listfunction nvmet_pci_epf_iod_parse_prp_simplefunction nvmet_pci_epf_iod_parse_prpsfunction nvmet_pci_epf_get_sgl_segmentfunction nvmet_pci_epf_iod_parse_sgl_segmentsfunction nvmet_pci_epf_iod_parse_sglsfunction nvmet_pci_epf_alloc_iod_data_buffunction for_each_sgtable_sgfunction nvmet_pci_epf_complete_iodfunction nvmet_pci_epf_drain_queuefunction nvmet_pci_epf_add_portfunction nvmet_pci_epf_remove_portfunction nvmet_pci_epf_find_port
Annotated Snippet
module_init(nvmet_pci_epf_init_module);
module_exit(nvmet_pci_epf_cleanup_module);
MODULE_DESCRIPTION("NVMe PCI Endpoint Function target driver");
MODULE_AUTHOR("Damien Le Moal <dlemoal@kernel.org>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/delay.h`, `linux/dmaengine.h`, `linux/io.h`, `linux/mempool.h`, `linux/module.h`, `linux/mutex.h`, `linux/nvme.h`, `linux/pci_ids.h`.
- Detected declarations: `struct nvmet_pci_epf_irq_vector`, `struct nvmet_pci_epf_queue`, `struct nvmet_pci_epf_segment`, `struct nvmet_pci_epf_iod`, `struct nvmet_pci_epf_ctrl`, `struct nvmet_pci_epf`, `struct nvmet_pci_epf_dma_filter`, `enum nvmet_pci_epf_queue_flags`, `function nvmet_pci_epf_bar_read32`, `function nvmet_pci_epf_bar_write32`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: integration 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.