drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h- Extension
.h- Size
- 14366 bytes
- Lines
- 556
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/compiler.hlinux/interrupt.hlinux/list.hlinux/mutex.hlinux/pci.hlinux/semaphore.hlinux/workqueue.hrdma/ib_verbs.hrdma/iter.hrdma/vmw_pvrdma-abi.hpvrdma_ring.hpvrdma_dev_api.hpvrdma_verbs.h
Detected Declarations
struct pvrdma_devstruct pvrdma_page_dirstruct pvrdma_cqstruct pvrdma_id_tablestruct pvrdma_uar_mapstruct pvrdma_uar_tablestruct pvrdma_ucontextstruct pvrdma_pdstruct pvrdma_mrstruct pvrdma_user_mrstruct pvrdma_wqstruct pvrdma_ahstruct pvrdma_srqstruct pvrdma_qpstruct pvrdma_devstruct pvrdma_netdevice_workfunction pvrdma_write_regfunction pvrdma_read_regfunction pvrdma_write_uar_cqfunction pvrdma_write_uar_qpfunction ib_mtu_to_pvrdmafunction pvrdma_mtu_to_ibfunction ib_port_state_to_pvrdmafunction pvrdma_port_state_to_ibfunction pvrdma_port_cap_flags_to_ibfunction ib_port_width_to_pvrdmafunction pvrdma_port_width_to_ibfunction ib_port_speed_to_pvrdmafunction pvrdma_port_speed_to_ibfunction ib_qp_attr_mask_to_pvrdmafunction ib_mig_state_to_pvrdmafunction pvrdma_mig_state_to_ibfunction ib_access_flags_to_pvrdmafunction pvrdma_access_flags_to_ibfunction ib_qp_type_to_pvrdmafunction ib_qp_state_to_pvrdmafunction pvrdma_qp_state_to_ibfunction ib_wr_opcode_to_pvrdmafunction pvrdma_wc_status_to_ibfunction pvrdma_wc_opcode_to_ibfunction pvrdma_wc_flags_to_ibfunction ib_send_flags_to_pvrdmafunction pvrdma_network_type_to_ib
Annotated Snippet
struct pvrdma_page_dir {
dma_addr_t dir_dma;
u64 *dir;
int ntables;
u64 **tables;
u64 npages;
void **pages;
};
struct pvrdma_cq {
struct ib_cq ibcq;
int offset;
spinlock_t cq_lock; /* Poll lock. */
struct pvrdma_uar_map *uar;
struct ib_umem *umem;
struct pvrdma_ring_state *ring_state;
struct pvrdma_page_dir pdir;
u32 cq_handle;
bool is_kernel;
refcount_t refcnt;
struct completion free;
};
struct pvrdma_id_table {
u32 last;
u32 top;
u32 max;
u32 mask;
spinlock_t lock; /* Table lock. */
unsigned long *table;
};
struct pvrdma_uar_map {
unsigned long pfn;
void __iomem *map;
int index;
};
struct pvrdma_uar_table {
struct pvrdma_id_table tbl;
int size;
};
struct pvrdma_ucontext {
struct ib_ucontext ibucontext;
struct pvrdma_dev *dev;
struct pvrdma_uar_map uar;
u64 ctx_handle;
};
struct pvrdma_pd {
struct ib_pd ibpd;
u32 pdn;
u32 pd_handle;
int privileged;
};
struct pvrdma_mr {
u32 mr_handle;
u64 iova;
u64 size;
};
struct pvrdma_user_mr {
struct ib_mr ibmr;
struct ib_umem *umem;
struct pvrdma_mr mmr;
struct pvrdma_page_dir pdir;
u64 *pages;
u32 npages;
u32 max_pages;
u32 page_shift;
};
struct pvrdma_wq {
struct pvrdma_ring *ring;
spinlock_t lock; /* Work queue lock. */
int wqe_cnt;
int wqe_size;
int max_sg;
int offset;
};
struct pvrdma_ah {
struct ib_ah ibah;
struct pvrdma_av av;
};
struct pvrdma_srq {
struct ib_srq ibsrq;
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/interrupt.h`, `linux/list.h`, `linux/mutex.h`, `linux/pci.h`, `linux/semaphore.h`, `linux/workqueue.h`, `rdma/ib_verbs.h`.
- Detected declarations: `struct pvrdma_dev`, `struct pvrdma_page_dir`, `struct pvrdma_cq`, `struct pvrdma_id_table`, `struct pvrdma_uar_map`, `struct pvrdma_uar_table`, `struct pvrdma_ucontext`, `struct pvrdma_pd`, `struct pvrdma_mr`, `struct pvrdma_user_mr`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.