Lines Matching refs:domain
99 static inline bool iommu_is_dma_domain(struct iommu_domain *domain) in iommu_is_dma_domain() argument
101 return domain->type & __IOMMU_DOMAIN_DMA_API; in iommu_is_dma_domain()
249 int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
250 void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
251 int (*map)(struct iommu_domain *domain, unsigned long iova,
253 int (*map_pages)(struct iommu_domain *domain, unsigned long iova,
256 size_t (*unmap)(struct iommu_domain *domain, unsigned long iova,
258 size_t (*unmap_pages)(struct iommu_domain *domain, unsigned long iova,
261 void (*flush_iotlb_all)(struct iommu_domain *domain);
262 void (*iotlb_sync_map)(struct iommu_domain *domain, unsigned long iova,
264 void (*iotlb_sync)(struct iommu_domain *domain,
266 phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova);
271 int (*enable_nesting)(struct iommu_domain *domain);
272 int (*set_pgtable_quirks)(struct iommu_domain *domain,
279 struct iommu_domain *domain,
283 bool (*is_attach_deferred)(struct iommu_domain *domain, struct device *dev);
292 int (*aux_attach_dev)(struct iommu_domain *domain, struct device *dev);
293 void (*aux_detach_dev)(struct iommu_domain *domain, struct device *dev);
294 int (*aux_get_pasid)(struct iommu_domain *domain, struct device *dev);
304 int (*cache_invalidate)(struct iommu_domain *domain, struct device *dev,
306 int (*sva_bind_gpasid)(struct iommu_domain *domain,
391 int iommu_deferred_attach(struct device *dev, struct iommu_domain *domain);
418 extern void iommu_domain_free(struct iommu_domain *domain);
419 extern int iommu_attach_device(struct iommu_domain *domain,
421 extern void iommu_detach_device(struct iommu_domain *domain,
423 extern int iommu_uapi_cache_invalidate(struct iommu_domain *domain,
427 extern int iommu_uapi_sva_bind_gpasid(struct iommu_domain *domain,
429 extern int iommu_uapi_sva_unbind_gpasid(struct iommu_domain *domain,
431 extern int iommu_sva_unbind_gpasid(struct iommu_domain *domain,
435 extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
437 extern int iommu_map_atomic(struct iommu_domain *domain, unsigned long iova,
439 extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova,
441 extern size_t iommu_unmap_fast(struct iommu_domain *domain,
444 extern ssize_t iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
446 extern ssize_t iommu_map_sg_atomic(struct iommu_domain *domain,
449 extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova);
450 extern void iommu_set_fault_handler(struct iommu_domain *domain,
466 extern int iommu_attach_group(struct iommu_domain *domain,
468 extern void iommu_detach_group(struct iommu_domain *domain,
502 int iommu_enable_nesting(struct iommu_domain *domain);
503 int iommu_set_pgtable_quirks(struct iommu_domain *domain,
508 extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev,
511 static inline void iommu_flush_iotlb_all(struct iommu_domain *domain) in iommu_flush_iotlb_all() argument
513 if (domain->ops->flush_iotlb_all) in iommu_flush_iotlb_all()
514 domain->ops->flush_iotlb_all(domain); in iommu_flush_iotlb_all()
517 static inline void iommu_iotlb_sync(struct iommu_domain *domain, in iommu_iotlb_sync() argument
520 if (domain->ops->iotlb_sync) in iommu_iotlb_sync()
521 domain->ops->iotlb_sync(domain, iotlb_gather); in iommu_iotlb_sync()
580 static inline void iommu_iotlb_gather_add_page(struct iommu_domain *domain, in iommu_iotlb_gather_add_page() argument
591 iommu_iotlb_sync(domain, gather); in iommu_iotlb_gather_add_page()
674 int iommu_aux_attach_device(struct iommu_domain *domain, struct device *dev);
675 void iommu_aux_detach_device(struct iommu_domain *domain, struct device *dev);
676 int iommu_aux_get_pasid(struct iommu_domain *domain, struct device *dev);
713 static inline void iommu_domain_free(struct iommu_domain *domain) in iommu_domain_free() argument
717 static inline int iommu_attach_device(struct iommu_domain *domain, in iommu_attach_device() argument
723 static inline void iommu_detach_device(struct iommu_domain *domain, in iommu_detach_device() argument
733 static inline int iommu_map(struct iommu_domain *domain, unsigned long iova, in iommu_map() argument
739 static inline int iommu_map_atomic(struct iommu_domain *domain, in iommu_map_atomic() argument
746 static inline size_t iommu_unmap(struct iommu_domain *domain, in iommu_unmap() argument
752 static inline size_t iommu_unmap_fast(struct iommu_domain *domain, in iommu_unmap_fast() argument
759 static inline ssize_t iommu_map_sg(struct iommu_domain *domain, in iommu_map_sg() argument
766 static inline ssize_t iommu_map_sg_atomic(struct iommu_domain *domain, in iommu_map_sg_atomic() argument
773 static inline void iommu_flush_iotlb_all(struct iommu_domain *domain) in iommu_flush_iotlb_all() argument
777 static inline void iommu_iotlb_sync(struct iommu_domain *domain, in iommu_iotlb_sync() argument
782 static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) in iommu_iova_to_phys() argument
787 static inline void iommu_set_fault_handler(struct iommu_domain *domain, in iommu_set_fault_handler() argument
821 static inline int iommu_attach_group(struct iommu_domain *domain, in iommu_attach_group() argument
827 static inline void iommu_detach_group(struct iommu_domain *domain, in iommu_detach_group() argument
922 static inline int iommu_set_pgtable_quirks(struct iommu_domain *domain, in iommu_set_pgtable_quirks() argument
944 static inline void iommu_iotlb_gather_add_page(struct iommu_domain *domain, in iommu_iotlb_gather_add_page() argument
1022 iommu_aux_attach_device(struct iommu_domain *domain, struct device *dev) in iommu_aux_attach_device() argument
1028 iommu_aux_detach_device(struct iommu_domain *domain, struct device *dev) in iommu_aux_detach_device() argument
1033 iommu_aux_get_pasid(struct iommu_domain *domain, struct device *dev) in iommu_aux_get_pasid() argument
1054 iommu_uapi_cache_invalidate(struct iommu_domain *domain, in iommu_uapi_cache_invalidate() argument
1061 static inline int iommu_uapi_sva_bind_gpasid(struct iommu_domain *domain, in iommu_uapi_sva_bind_gpasid() argument
1067 static inline int iommu_uapi_sva_unbind_gpasid(struct iommu_domain *domain, in iommu_uapi_sva_unbind_gpasid() argument
1073 static inline int iommu_sva_unbind_gpasid(struct iommu_domain *domain, in iommu_sva_unbind_gpasid() argument
1096 static inline size_t iommu_map_sgtable(struct iommu_domain *domain, in iommu_map_sgtable() argument
1099 return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); in iommu_map_sgtable()