drivers/dma/idxd/idxd.h
Source file repositories/reference/linux-study-clean/drivers/dma/idxd/idxd.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/idxd/idxd.h- Extension
.h- Size
- 21351 bytes
- Lines
- 845
- Domain
- Driver Families
- Bucket
- drivers/dma
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sbitmap.hlinux/dmaengine.hlinux/percpu-rwsem.hlinux/wait.hlinux/cdev.hlinux/idr.hlinux/pci.hlinux/bitmap.hlinux/perf_event.hlinux/iommu.hlinux/crypto.huapi/linux/idxd.hregisters.h
Detected Declarations
struct idxd_wqstruct idxd_devstruct idxd_devstruct idxd_descstruct idxd_device_driverstruct idxd_irq_entrystruct idxd_groupstruct idxd_pmustruct idxd_cdevstruct idxd_dma_chanstruct idxd_wqstruct idxd_enginestruct idxd_hwstruct idxd_dma_devstruct idxd_driver_datastruct idxd_evlstruct idxd_evl_faultstruct idxd_devicestruct idxd_saved_statesstruct crypto_ctxstruct idxd_descenum idxd_dev_typeenum idxd_typeenum idxd_complete_typeenum idxd_wq_stateenum idxd_wq_flagenum idxd_wq_typeenum idxd_op_typeenum idxd_device_stateenum idxd_device_flagenum idxd_completion_statusenum idxd_portal_protenum idxd_interrupt_typefunction evl_ent_sizefunction evl_sizefunction idxd_dev_set_typefunction idxd_set_user_intrfunction is_dsa_devfunction is_iax_devfunction is_idxd_devfunction is_idxd_wq_devfunction is_idxd_wq_dmaenginefunction is_idxd_wq_userfunction is_idxd_wq_kernelfunction wq_dedicatedfunction wq_sharedfunction device_pasid_enabledfunction device_user_pasid_enabled
Annotated Snippet
struct device_driver drv;
};
extern struct idxd_device_driver dsa_drv;
extern struct idxd_device_driver idxd_drv;
extern struct idxd_device_driver idxd_dmaengine_drv;
extern struct idxd_device_driver idxd_user_drv;
#define INVALID_INT_HANDLE -1
struct idxd_irq_entry {
int id;
int vector;
struct llist_head pending_llist;
struct list_head work_list;
/*
* Lock to protect access between irq thread process descriptor
* and irq thread processing error descriptor.
*/
spinlock_t list_lock;
int int_handle;
ioasid_t pasid;
};
struct idxd_group {
struct idxd_dev idxd_dev;
struct idxd_device *idxd;
struct grpcfg grpcfg;
int id;
int num_engines;
int num_wqs;
bool use_rdbuf_limit;
u8 rdbufs_allowed;
u8 rdbufs_reserved;
int tc_a;
int tc_b;
int desc_progress_limit;
int batch_progress_limit;
};
struct idxd_pmu {
struct idxd_device *idxd;
struct perf_event *event_list[IDXD_PMU_EVENT_MAX];
int n_events;
DECLARE_BITMAP(used_mask, IDXD_PMU_EVENT_MAX);
struct pmu pmu;
char name[IDXD_NAME_SIZE];
int n_counters;
int counter_width;
int n_event_categories;
bool per_counter_caps_supported;
unsigned long supported_event_categories;
unsigned long supported_filters;
int n_filters;
};
#define IDXD_MAX_PRIORITY 0xf
enum {
COUNTER_FAULTS = 0,
COUNTER_FAULT_FAILS,
COUNTER_MAX
};
enum idxd_wq_state {
IDXD_WQ_DISABLED = 0,
IDXD_WQ_ENABLED,
};
enum idxd_wq_flag {
WQ_FLAG_DEDICATED = 0,
WQ_FLAG_BLOCK_ON_FAULT,
WQ_FLAG_ATS_DISABLE,
WQ_FLAG_PRS_DISABLE,
};
enum idxd_wq_type {
IDXD_WQT_NONE = 0,
IDXD_WQT_KERNEL,
IDXD_WQT_USER,
};
struct idxd_cdev {
struct idxd_wq *wq;
struct cdev cdev;
Annotation
- Immediate include surface: `linux/sbitmap.h`, `linux/dmaengine.h`, `linux/percpu-rwsem.h`, `linux/wait.h`, `linux/cdev.h`, `linux/idr.h`, `linux/pci.h`, `linux/bitmap.h`.
- Detected declarations: `struct idxd_wq`, `struct idxd_dev`, `struct idxd_dev`, `struct idxd_desc`, `struct idxd_device_driver`, `struct idxd_irq_entry`, `struct idxd_group`, `struct idxd_pmu`, `struct idxd_cdev`, `struct idxd_dma_chan`.
- Atlas domain: Driver Families / drivers/dma.
- Implementation status: pattern implementation candidate.
- 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.