Lines Matching +full:iommu +full:- +full:ctx
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
37 #include <dev/iommu/iommu_types.h>
87 * entries. This is a client-controlled quirk to support some
102 * (u) - Protected by iommu unit lock
103 * (d) - Protected by domain lock
104 * (c) - Immutable after initialization
108 struct iommu_unit *iommu; /* (c) */ member
120 struct iommu_map_entry *msi_entry; /* (d) Arch-specific */
121 iommu_gaddr_t msi_base; /* (d) Arch-specific */
122 vm_paddr_t msi_phys; /* (d) Arch-specific */
152 #define IOMMU_LOCK(unit) mtx_lock(&(unit)->lock)
153 #define IOMMU_UNLOCK(unit) mtx_unlock(&(unit)->lock)
154 #define IOMMU_ASSERT_LOCKED(unit) mtx_assert(&(unit)->lock, MA_OWNED)
156 #define IOMMU_DOMAIN_LOCK(dom) mtx_lock(&(dom)->lock)
157 #define IOMMU_DOMAIN_UNLOCK(dom) mtx_unlock(&(dom)->lock)
158 #define IOMMU_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->lock, MA_OWNED)
160 void iommu_free_ctx(struct iommu_ctx *ctx);
161 void iommu_free_ctx_locked(struct iommu_unit *iommu, struct iommu_ctx *ctx);
170 void iommu_unit_pre_instantiate_ctx(struct iommu_unit *iommu);
171 struct iommu_ctx *iommu_instantiate_ctx(struct iommu_unit *iommu,
208 struct iommu_domain *iommu_get_ctx_domain(struct iommu_ctx *ctx);