drivers/ntb/hw/idt/ntb_hw_idt.h
Source file repositories/reference/linux-study-clean/drivers/ntb/hw/idt/ntb_hw_idt.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/ntb/hw/idt/ntb_hw_idt.h- Extension
.h- Size
- 45551 bytes
- Lines
- 1227
- Domain
- Driver Families
- Bucket
- drivers/ntb
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/pci.hlinux/pci_ids.hlinux/interrupt.hlinux/spinlock.hlinux/mutex.hlinux/ntb.h
Detected Declarations
struct idt_89hpes_cfgstruct idt_mw_cfgstruct idt_ntb_peerstruct idt_ntb_devstruct idt_ntb_barstruct idt_ntb_msgstruct idt_ntb_regsstruct idt_ntb_portstruct idt_ntb_partenum idt_temp_valenum idt_mw_type
Annotated Snippet
struct idt_89hpes_cfg {
char *name;
unsigned char port_cnt;
unsigned char ports[];
};
/*
* Memory window configuration structure
* @type: Type of the memory window (direct address translation or lookup
* table)
*
* @bar: PCIe BAR the memory window referenced to
* @idx: Index of the memory window within the BAR
*
* @addr_align: Alignment of translated address
* @size_align: Alignment of memory window size
* @size_max: Maximum size of memory window
*/
struct idt_mw_cfg {
enum idt_mw_type type;
unsigned char bar;
unsigned char idx;
u64 addr_align;
u64 size_align;
u64 size_max;
};
/*
* Description structure of peer IDT NT-functions:
* @port: NT-function port
* @part: NT-function partition
*
* @mw_cnt: Number of memory windows supported by NT-function
* @mws: Array of memory windows descriptors
*/
struct idt_ntb_peer {
unsigned char port;
unsigned char part;
unsigned char mw_cnt;
struct idt_mw_cfg *mws;
};
/*
* Description structure of local IDT NT-function:
* @ntb: Linux NTB-device description structure
* @swcfg: Pointer to the structure of local IDT PCIe-switch
* specific cofnfigurations
*
* @port: Local NT-function port
* @part: Local NT-function partition
*
* @peer_cnt: Number of peers with activated NTB-function
* @peers: Array of peers descripting structures
* @port_idx_map: Map of port number -> peer index
* @part_idx_map: Map of partition number -> peer index
*
* @mtbl_lock: Mapping table access lock
*
* @mw_cnt: Number of memory windows supported by NT-function
* @mws: Array of memory windows descriptors
* @lut_lock: Lookup table access lock
*
* @msg_locks: Message registers mapping table lockers
*
* @cfgspc: Virtual address of the memory mapped configuration
* space of the NT-function
* @db_mask_lock: Doorbell mask register lock
* @msg_mask_lock: Message mask register lock
* @gasa_lock: GASA registers access lock
*
* @hwmon_mtx: Temperature sensor interface update mutex
*
* @dbgfs_info: DebugFS info node
*/
struct idt_ntb_dev {
struct ntb_dev ntb;
struct idt_89hpes_cfg *swcfg;
unsigned char port;
unsigned char part;
unsigned char peer_cnt;
struct idt_ntb_peer peers[IDT_MAX_NR_PEERS];
char port_idx_map[IDT_MAX_NR_PORTS];
char part_idx_map[IDT_MAX_NR_PARTS];
spinlock_t mtbl_lock;
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/interrupt.h`, `linux/spinlock.h`, `linux/mutex.h`, `linux/ntb.h`.
- Detected declarations: `struct idt_89hpes_cfg`, `struct idt_mw_cfg`, `struct idt_ntb_peer`, `struct idt_ntb_dev`, `struct idt_ntb_bar`, `struct idt_ntb_msg`, `struct idt_ntb_regs`, `struct idt_ntb_port`, `struct idt_ntb_part`, `enum idt_temp_val`.
- Atlas domain: Driver Families / drivers/ntb.
- Implementation status: source 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.