drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c- Extension
.c- Size
- 31199 bytes
- Lines
- 1157
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/errno.hlinux/inetdevice.hlinux/init.hlinux/module.hlinux/slab.hrdma/ib_addr.hrdma/ib_smi.hrdma/ib_user_verbs.hnet/addrconf.hpvrdma.h
Detected Declarations
function hca_type_showfunction hw_rev_showfunction board_id_showfunction pvrdma_get_fw_ver_strfunction pvrdma_init_devicefunction pvrdma_port_immutablefunction pvrdma_dispatch_eventfunction pvrdma_report_event_handlefunction pvrdma_register_devicefunction pvrdma_intr0_handlerfunction pvrdma_qp_eventfunction pvrdma_cq_eventfunction pvrdma_srq_eventfunction pvrdma_dev_eventfunction pvrdma_intr1_handlerfunction pvrdma_intrx_handlerfunction pvrdma_free_irqfunction pvrdma_enable_intrsfunction pvrdma_disable_intrsfunction pvrdma_alloc_intrsfunction pvrdma_free_slotsfunction pvrdma_add_gid_at_indexfunction pvrdma_add_gidfunction pvrdma_del_gid_at_indexfunction pvrdma_del_gidfunction pvrdma_netdevice_event_handlefunction pvrdma_netdevice_event_workfunction pvrdma_netdevice_eventfunction pvrdma_pci_probefunction pvrdma_pci_removefunction pvrdma_initfunction pvrdma_cleanupmodule init pvrdma_init
Annotated Snippet
static struct pci_driver pvrdma_driver = {
.name = DRV_NAME,
.id_table = pvrdma_pci_table,
.probe = pvrdma_pci_probe,
.remove = pvrdma_pci_remove,
};
static int __init pvrdma_init(void)
{
int err;
event_wq = alloc_ordered_workqueue("pvrdma_event_wq", WQ_MEM_RECLAIM);
if (!event_wq)
return -ENOMEM;
err = pci_register_driver(&pvrdma_driver);
if (err)
destroy_workqueue(event_wq);
return err;
}
static void __exit pvrdma_cleanup(void)
{
pci_unregister_driver(&pvrdma_driver);
destroy_workqueue(event_wq);
}
module_init(pvrdma_init);
module_exit(pvrdma_cleanup);
MODULE_AUTHOR("VMware, Inc");
MODULE_DESCRIPTION("VMware Paravirtual RDMA driver");
MODULE_LICENSE("Dual BSD/GPL");
Annotation
- Immediate include surface: `linux/errno.h`, `linux/inetdevice.h`, `linux/init.h`, `linux/module.h`, `linux/slab.h`, `rdma/ib_addr.h`, `rdma/ib_smi.h`, `rdma/ib_user_verbs.h`.
- Detected declarations: `function hca_type_show`, `function hw_rev_show`, `function board_id_show`, `function pvrdma_get_fw_ver_str`, `function pvrdma_init_device`, `function pvrdma_port_immutable`, `function pvrdma_dispatch_event`, `function pvrdma_report_event_handle`, `function pvrdma_register_device`, `function pvrdma_intr0_handler`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.