drivers/dibs/dibs_loopback.h
Source file repositories/reference/linux-study-clean/drivers/dibs/dibs_loopback.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/dibs/dibs_loopback.h- Extension
.h- Size
- 1117 bytes
- Lines
- 58
- Domain
- Driver Families
- Bucket
- drivers/dibs
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dibs.hlinux/hashtable.hlinux/spinlock.hlinux/types.hlinux/wait.h
Detected Declarations
struct dibs_lo_dmb_nodestruct dibs_lo_devfunction dibs_loopback_initfunction dibs_loopback_exit
Annotated Snippet
struct dibs_lo_dmb_node {
struct hlist_node list;
u64 token;
u32 len;
u32 sba_idx;
void *cpu_addr;
dma_addr_t dma_addr;
refcount_t refcnt;
};
struct dibs_lo_dev {
struct dibs_dev *dibs;
atomic_t dmb_cnt;
rwlock_t dmb_ht_lock;
DECLARE_BITMAP(sba_idx_mask, DIBS_LO_MAX_DMBS);
DECLARE_HASHTABLE(dmb_ht, DIBS_LO_DMBS_HASH_BITS);
wait_queue_head_t ldev_release;
};
int dibs_loopback_init(void);
void dibs_loopback_exit(void);
#else
static inline int dibs_loopback_init(void)
{
return 0;
}
static inline void dibs_loopback_exit(void)
{
}
#endif
#endif /* _DIBS_LOOPBACK_H */
Annotation
- Immediate include surface: `linux/dibs.h`, `linux/hashtable.h`, `linux/spinlock.h`, `linux/types.h`, `linux/wait.h`.
- Detected declarations: `struct dibs_lo_dmb_node`, `struct dibs_lo_dev`, `function dibs_loopback_init`, `function dibs_loopback_exit`.
- Atlas domain: Driver Families / drivers/dibs.
- 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.