arch/um/drivers/virt-pci.c
Source file repositories/reference/linux-study-clean/arch/um/drivers/virt-pci.c
File Facts
- System
- Linux kernel
- Corpus path
arch/um/drivers/virt-pci.c- Extension
.c- Size
- 13849 bytes
- Lines
- 619
- Domain
- Architecture Layer
- Bucket
- arch/um
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/pci.hlinux/logic_iomem.hlinux/of_platform.hlinux/irqchip/irq-msi-lib.hlinux/irqdomain.hlinux/msi.hlinux/unaligned.hirq_kern.hvirt-pci.h
Detected Declarations
struct um_pci_device_regstruct um_pci_map_iomem_datafunction um_pci_cfgspace_readfunction um_pci_cfgspace_writefunction um_pci_bar_readfunction um_pci_bar_writefunction um_pci_bar_copy_fromfunction um_pci_bar_copy_tofunction um_pci_bar_setfunction um_pci_rescanfunction for_each_node_by_typefunction um_pci_map_cfgspacefunction um_pci_map_iomem_walkfunction um_pci_map_iomemfunction um_pci_compose_msi_msgfunction um_pci_inner_domain_allocfunction um_pci_inner_domain_freefunction um_pci_map_irqfunction um_pci_map_platformfunction um_pci_device_registerfunction um_pci_device_unregisterfunction um_pci_platform_device_registerfunction um_pci_platform_device_unregisterfunction um_pci_initfunction um_pci_exitmodule init um_pci_init
Annotated Snippet
device_initcall(um_pci_init);
static void __exit um_pci_exit(void)
{
irq_domain_remove(um_pci_inner_domain);
pci_free_resource_list(&bridge->windows);
pci_free_host_bridge(bridge);
}
module_exit(um_pci_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/pci.h`, `linux/logic_iomem.h`, `linux/of_platform.h`, `linux/irqchip/irq-msi-lib.h`, `linux/irqdomain.h`, `linux/msi.h`, `linux/unaligned.h`.
- Detected declarations: `struct um_pci_device_reg`, `struct um_pci_map_iomem_data`, `function um_pci_cfgspace_read`, `function um_pci_cfgspace_write`, `function um_pci_bar_read`, `function um_pci_bar_write`, `function um_pci_bar_copy_from`, `function um_pci_bar_copy_to`, `function um_pci_bar_set`, `function um_pci_rescan`.
- Atlas domain: Architecture Layer / arch/um.
- 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.