Lines Matching full:domain
65 /* Domain feature flags */
67 #define __IOMMU_DOMAIN_DMA_API (1U << 1) /* Domain for use in DMA-API
69 #define __IOMMU_DOMAIN_PT (1U << 2) /* Domain is identity mapped */
72 * This are the possible domain-types
163 * @domain_alloc: allocate iommu domain
164 * @domain_free: free iommu domain
165 * @attach_dev: attach device to an iommu domain
166 * @detach_dev: detach device from an iommu domain
167 * @map: map a physically contiguous memory region to an iommu domain
168 * @unmap: unmap a physically contiguous memory region from an iommu domain
169 * @flush_tlb_all: Synchronously flush all hardware TLBs for this domain
170 * @tlb_range_add: Add a given iova range to the flush queue for this domain
177 * @domain_get_attr: Query domain attributes
178 * @domain_set_attr: Change domain attributes
182 * @domain_window_enable: Configure and enable a particular window for a domain
183 * @domain_window_disable: Disable a particular window for a domain
184 * @domain_set_windows: Set the number of windows for a domain
185 * @domain_get_windows: Return the number of windows for a domain
192 /* Domain allocation and freeing by the iommu driver */
196 int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
197 void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
198 int (*map)(struct iommu_domain *domain, unsigned long iova,
200 size_t (*unmap)(struct iommu_domain *domain, unsigned long iova,
202 void (*flush_iotlb_all)(struct iommu_domain *domain);
203 void (*iotlb_range_add)(struct iommu_domain *domain,
205 void (*iotlb_sync)(struct iommu_domain *domain);
206 phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova);
210 int (*domain_get_attr)(struct iommu_domain *domain,
212 int (*domain_set_attr)(struct iommu_domain *domain,
219 struct iommu_domain *domain,
223 int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr,
225 void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr);
226 /* Set the number of windows per domain */
227 int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count);
228 /* Get the number of windows per domain */
229 u32 (*domain_get_windows)(struct iommu_domain *domain);
232 bool (*is_attach_deferred)(struct iommu_domain *domain, struct device *dev);
290 extern void iommu_domain_free(struct iommu_domain *domain);
291 extern int iommu_attach_device(struct iommu_domain *domain,
293 extern void iommu_detach_device(struct iommu_domain *domain,
296 extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
298 extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova,
300 extern size_t iommu_unmap_fast(struct iommu_domain *domain,
302 extern size_t iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
304 extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova);
305 extern void iommu_set_fault_handler(struct iommu_domain *domain,
317 extern int iommu_attach_group(struct iommu_domain *domain,
319 extern void iommu_detach_group(struct iommu_domain *domain,
343 extern int iommu_domain_get_attr(struct iommu_domain *domain, enum iommu_attr,
345 extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr,
349 extern int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr,
352 extern void iommu_domain_window_disable(struct iommu_domain *domain, u32 wnd_nr);
354 extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev,
357 static inline void iommu_flush_tlb_all(struct iommu_domain *domain) in iommu_flush_tlb_all() argument
359 if (domain->ops->flush_iotlb_all) in iommu_flush_tlb_all()
360 domain->ops->flush_iotlb_all(domain); in iommu_flush_tlb_all()
363 static inline void iommu_tlb_range_add(struct iommu_domain *domain, in iommu_tlb_range_add() argument
366 if (domain->ops->iotlb_range_add) in iommu_tlb_range_add()
367 domain->ops->iotlb_range_add(domain, iova, size); in iommu_tlb_range_add()
370 static inline void iommu_tlb_sync(struct iommu_domain *domain) in iommu_tlb_sync() argument
372 if (domain->ops->iotlb_sync) in iommu_tlb_sync()
373 domain->ops->iotlb_sync(domain); in iommu_tlb_sync()
430 static inline void iommu_domain_free(struct iommu_domain *domain) in iommu_domain_free() argument
434 static inline int iommu_attach_device(struct iommu_domain *domain, in iommu_attach_device() argument
440 static inline void iommu_detach_device(struct iommu_domain *domain, in iommu_detach_device() argument
450 static inline int iommu_map(struct iommu_domain *domain, unsigned long iova, in iommu_map() argument
456 static inline size_t iommu_unmap(struct iommu_domain *domain, in iommu_unmap() argument
462 static inline size_t iommu_unmap_fast(struct iommu_domain *domain, in iommu_unmap_fast() argument
468 static inline size_t iommu_map_sg(struct iommu_domain *domain, in iommu_map_sg() argument
475 static inline void iommu_flush_tlb_all(struct iommu_domain *domain) in iommu_flush_tlb_all() argument
479 static inline void iommu_tlb_range_add(struct iommu_domain *domain, in iommu_tlb_range_add() argument
484 static inline void iommu_tlb_sync(struct iommu_domain *domain) in iommu_tlb_sync() argument
488 static inline int iommu_domain_window_enable(struct iommu_domain *domain, in iommu_domain_window_enable() argument
495 static inline void iommu_domain_window_disable(struct iommu_domain *domain, in iommu_domain_window_disable() argument
500 static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) in iommu_iova_to_phys() argument
505 static inline void iommu_set_fault_handler(struct iommu_domain *domain, in iommu_set_fault_handler() argument
531 static inline int iommu_attach_group(struct iommu_domain *domain, in iommu_attach_group() argument
537 static inline void iommu_detach_group(struct iommu_domain *domain, in iommu_detach_group() argument
607 static inline int iommu_domain_get_attr(struct iommu_domain *domain, in iommu_domain_get_attr() argument
613 static inline int iommu_domain_set_attr(struct iommu_domain *domain, in iommu_domain_set_attr() argument