drivers/pci/hotplug/shpchp_core.c
Source file repositories/reference/linux-study-clean/drivers/pci/hotplug/shpchp_core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/hotplug/shpchp_core.c- Extension
.c- Size
- 8215 bytes
- Lines
- 335
- 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.
- 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/module.hlinux/moduleparam.hlinux/kernel.hlinux/types.hlinux/slab.hlinux/pci.hshpchp.h
Detected Declarations
function init_slotsfunction cleanup_slotsfunction list_for_each_entry_safefunction set_attention_statusfunction enable_slotfunction disable_slotfunction get_power_statusfunction get_attention_statusfunction get_latch_statusfunction get_adapter_statusfunction shpc_capablefunction shpc_probefunction shpc_removefunction shpcd_initfunction shpcd_cleanupmodule init shpcd_init
Annotated Snippet
static struct pci_driver shpc_driver = {
.name = SHPC_MODULE_NAME,
.id_table = shpcd_pci_tbl,
.probe = shpc_probe,
.remove = shpc_remove,
};
static int __init shpcd_init(void)
{
return pci_register_driver(&shpc_driver);
}
static void __exit shpcd_cleanup(void)
{
pci_unregister_driver(&shpc_driver);
}
module_init(shpcd_init);
module_exit(shpcd_cleanup);
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/types.h`, `linux/slab.h`, `linux/pci.h`, `shpchp.h`.
- Detected declarations: `function init_slots`, `function cleanup_slots`, `function list_for_each_entry_safe`, `function set_attention_status`, `function enable_slot`, `function disable_slot`, `function get_power_status`, `function get_attention_status`, `function get_latch_status`, `function get_adapter_status`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: pattern 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.