drivers/iommu/iommu-priv.h
Source file repositories/reference/linux-study-clean/drivers/iommu/iommu-priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iommu/iommu-priv.h- Extension
.h- Size
- 3992 bytes
- Lines
- 127
- Domain
- Driver Families
- Bucket
- drivers/iommu
- 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/iommu.hlinux/iommu-debug-pagealloc.hlinux/msi.h
Detected Declarations
function iommufd_sw_msifunction iommu_debug_mapfunction iommu_debug_unmap_beginfunction iommu_debug_unmap_endfunction iommu_debug_map
Annotated Snippet
const struct bus_type *bus,
struct notifier_block *nb);
void iommu_device_unregister_bus(struct iommu_device *iommu,
const struct bus_type *bus,
struct notifier_block *nb);
int iommu_mock_device_add(struct device *dev, struct iommu_device *iommu);
struct iommu_attach_handle *iommu_attach_handle_get(struct iommu_group *group,
ioasid_t pasid,
unsigned int type);
int iommu_attach_group_handle(struct iommu_domain *domain,
struct iommu_group *group,
struct iommu_attach_handle *handle);
void iommu_detach_group_handle(struct iommu_domain *domain,
struct iommu_group *group);
int iommu_replace_group_handle(struct iommu_group *group,
struct iommu_domain *new_domain,
struct iommu_attach_handle *handle);
#if IS_ENABLED(CONFIG_IOMMUFD_DRIVER_CORE) && IS_ENABLED(CONFIG_IRQ_MSI_IOMMU)
int iommufd_sw_msi(struct iommu_domain *domain, struct msi_desc *desc,
phys_addr_t msi_addr);
#else /* !CONFIG_IOMMUFD_DRIVER_CORE || !CONFIG_IRQ_MSI_IOMMU */
static inline int iommufd_sw_msi(struct iommu_domain *domain,
struct msi_desc *desc, phys_addr_t msi_addr)
{
return -EOPNOTSUPP;
}
#endif /* CONFIG_IOMMUFD_DRIVER_CORE && CONFIG_IRQ_MSI_IOMMU */
int iommu_replace_device_pasid(struct iommu_domain *domain,
struct device *dev, ioasid_t pasid,
struct iommu_attach_handle *handle);
#ifdef CONFIG_IOMMU_DEBUG_PAGEALLOC
void __iommu_debug_map(struct iommu_domain *domain, phys_addr_t phys,
size_t size);
void __iommu_debug_unmap_begin(struct iommu_domain *domain,
unsigned long iova, size_t size);
void __iommu_debug_unmap_end(struct iommu_domain *domain,
unsigned long iova, size_t size, size_t unmapped);
static inline void iommu_debug_map(struct iommu_domain *domain,
phys_addr_t phys, size_t size)
{
if (static_branch_unlikely(&iommu_debug_initialized))
__iommu_debug_map(domain, phys, size);
}
static inline void iommu_debug_unmap_begin(struct iommu_domain *domain,
unsigned long iova, size_t size)
{
if (static_branch_unlikely(&iommu_debug_initialized))
__iommu_debug_unmap_begin(domain, iova, size);
}
static inline void iommu_debug_unmap_end(struct iommu_domain *domain,
unsigned long iova, size_t size,
size_t unmapped)
{
if (static_branch_unlikely(&iommu_debug_initialized))
__iommu_debug_unmap_end(domain, iova, size, unmapped);
}
void iommu_debug_init(void);
#else
static inline void iommu_debug_map(struct iommu_domain *domain,
phys_addr_t phys, size_t size)
{
}
static inline void iommu_debug_unmap_begin(struct iommu_domain *domain,
unsigned long iova, size_t size)
{
}
static inline void iommu_debug_unmap_end(struct iommu_domain *domain,
unsigned long iova, size_t size,
size_t unmapped)
{
}
static inline void iommu_debug_init(void)
{
}
#endif /* CONFIG_IOMMU_DEBUG_PAGEALLOC */
Annotation
- Immediate include surface: `linux/iommu.h`, `linux/iommu-debug-pagealloc.h`, `linux/msi.h`.
- Detected declarations: `function iommufd_sw_msi`, `function iommu_debug_map`, `function iommu_debug_unmap_begin`, `function iommu_debug_unmap_end`, `function iommu_debug_map`.
- Atlas domain: Driver Families / drivers/iommu.
- 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.