drivers/pci/hotplug/cpqphp_core.c
Source file repositories/reference/linux-study-clean/drivers/pci/hotplug/cpqphp_core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/hotplug/cpqphp_core.c- Extension
.c- Size
- 34538 bytes
- Lines
- 1408
- 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/module.hlinux/moduleparam.hlinux/kernel.hlinux/types.hlinux/proc_fs.hlinux/slab.hlinux/workqueue.hlinux/pci.hlinux/pci_hotplug.hlinux/init.hlinux/interrupt.hlinux/uaccess.hcpqphp.hcpqphp_nvram.h
Detected Declarations
function is_slot64bitfunction is_slot66mhzfunction tablesfunction init_SERRfunction init_cpqhp_routing_tablefunction pci_print_IRQ_routefunction ctrl_slot_cleanupfunction get_slot_mappingfunction cpqhp_set_attention_statusfunction set_attention_statusfunction process_SIfunction process_SSfunction hardware_testfunction get_power_statusfunction get_attention_statusfunction get_latch_statusfunction get_adapter_statusfunction ctrl_slot_setupfunction one_time_initfunction cpqhpc_probefunction unload_cpqphpdfunction cpqhpc_initfunction cpqhpc_cleanupmodule init cpqhpc_init
Annotated Snippet
static struct pci_driver cpqhpc_driver = {
.name = "compaq_pci_hotplug",
.id_table = hpcd_pci_tbl,
.probe = cpqhpc_probe,
/* remove: cpqhpc_remove_one, */
};
static int __init cpqhpc_init(void)
{
int result;
cpqhp_debug = debug;
info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
cpqhp_initialize_debugfs();
result = pci_register_driver(&cpqhpc_driver);
dbg("pci_register_driver = %d\n", result);
return result;
}
static void __exit cpqhpc_cleanup(void)
{
dbg("unload_cpqphpd()\n");
unload_cpqphpd();
dbg("pci_unregister_driver\n");
pci_unregister_driver(&cpqhpc_driver);
cpqhp_shutdown_debugfs();
}
module_init(cpqhpc_init);
module_exit(cpqhpc_cleanup);
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/types.h`, `linux/proc_fs.h`, `linux/slab.h`, `linux/workqueue.h`, `linux/pci.h`.
- Detected declarations: `function is_slot64bit`, `function is_slot66mhz`, `function tables`, `function init_SERR`, `function init_cpqhp_routing_table`, `function pci_print_IRQ_route`, `function ctrl_slot_cleanup`, `function get_slot_mapping`, `function cpqhp_set_attention_status`, `function set_attention_status`.
- 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.