drivers/pci/controller/vmd.c
Source file repositories/reference/linux-study-clean/drivers/pci/controller/vmd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/controller/vmd.c- Extension
.c- Size
- 30675 bytes
- Lines
- 1155
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: operation-table or driver-model contract
- Status
- pattern 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.
- 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/device.hlinux/interrupt.hlinux/irq.hlinux/irqchip/irq-msi-lib.hlinux/kernel.hlinux/module.hlinux/msi.hlinux/pci.hlinux/pci-acpi.hlinux/pci-ecam.hlinux/srcu.hlinux/rculist.hlinux/rcupdate.hxen/xen.hasm/irqdomain.h
Detected Declarations
struct vmd_irqstruct vmd_irq_liststruct vmd_devenum vmd_featuresfunction index_from_irqsfunction vmd_compose_msi_msgfunction vmd_irq_enablefunction scoped_guardfunction vmd_pci_msi_enablefunction vmd_pci_msi_startupfunction vmd_irq_disablefunction scoped_guardfunction vmd_pci_msi_disablefunction vmd_pci_msi_shutdownfunction scoped_guardfunction vmd_msi_allocfunction vmd_msi_freefunction vmd_init_dev_msi_infofunction vmd_create_irq_domainfunction vmd_set_msi_remappingfunction vmd_remove_irq_domainfunction vmd_pci_readfunction vmd_pci_writefunction vmd_acpi_beginfunction vmd_acpi_endfunction vmd_acpi_beginfunction vmd_attach_resourcesfunction vmd_detach_resourcesfunction vmd_get_phys_offsetsfunction vmd_get_bus_number_startfunction vmd_irqfunction vmd_alloc_irqsfunction vmd_copy_host_bridge_flagsfunction vmd_pm_enable_quirkfunction vmd_enable_domainfunction vmd_probefunction dma_set_mask_and_coherentfunction vmd_cleanup_srcufunction vmd_removefunction vmd_shutdownfunction vmd_suspendfunction vmd_resume
Annotated Snippet
static struct pci_driver vmd_drv = {
.name = "vmd",
.id_table = vmd_ids,
.probe = vmd_probe,
.remove = vmd_remove,
.shutdown = vmd_shutdown,
.driver = {
.pm = &vmd_dev_pm_ops,
},
};
module_pci_driver(vmd_drv);
MODULE_AUTHOR("Intel Corporation");
MODULE_DESCRIPTION("Volume Management Device driver");
MODULE_LICENSE("GPL v2");
MODULE_VERSION("0.6");
Annotation
- Immediate include surface: `linux/device.h`, `linux/interrupt.h`, `linux/irq.h`, `linux/irqchip/irq-msi-lib.h`, `linux/kernel.h`, `linux/module.h`, `linux/msi.h`, `linux/pci.h`.
- Detected declarations: `struct vmd_irq`, `struct vmd_irq_list`, `struct vmd_dev`, `enum vmd_features`, `function index_from_irqs`, `function vmd_compose_msi_msg`, `function vmd_irq_enable`, `function scoped_guard`, `function vmd_pci_msi_enable`, `function vmd_pci_msi_startup`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.