diff options
Diffstat (limited to 'include/linux/iommu.h')
| -rw-r--r-- | include/linux/iommu.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 19938ee6eb31..87994c265bf5 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -166,8 +166,6 @@ struct iommu_resv_region { | |||
| 166 | * @detach_dev: detach device from an iommu domain | 166 | * @detach_dev: detach device from an iommu domain |
| 167 | * @map: map a physically contiguous memory region to 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 | 168 | * @unmap: unmap a physically contiguous memory region from an iommu domain |
| 169 | * @map_sg: map a scatter-gather list of physically contiguous memory chunks | ||
| 170 | * to an iommu domain | ||
| 171 | * @flush_tlb_all: Synchronously flush all hardware TLBs for this domain | 169 | * @flush_tlb_all: Synchronously flush all hardware TLBs for this domain |
| 172 | * @tlb_range_add: Add a given iova range to the flush queue for this domain | 170 | * @tlb_range_add: Add a given iova range to the flush queue for this domain |
| 173 | * @tlb_sync: Flush all queued ranges from the hardware TLBs and empty flush | 171 | * @tlb_sync: Flush all queued ranges from the hardware TLBs and empty flush |
| @@ -201,8 +199,6 @@ struct iommu_ops { | |||
| 201 | phys_addr_t paddr, size_t size, int prot); | 199 | phys_addr_t paddr, size_t size, int prot); |
| 202 | size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, | 200 | size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, |
| 203 | size_t size); | 201 | size_t size); |
| 204 | size_t (*map_sg)(struct iommu_domain *domain, unsigned long iova, | ||
| 205 | struct scatterlist *sg, unsigned int nents, int prot); | ||
| 206 | void (*flush_iotlb_all)(struct iommu_domain *domain); | 202 | void (*flush_iotlb_all)(struct iommu_domain *domain); |
| 207 | void (*iotlb_range_add)(struct iommu_domain *domain, | 203 | void (*iotlb_range_add)(struct iommu_domain *domain, |
| 208 | unsigned long iova, size_t size); | 204 | unsigned long iova, size_t size); |
| @@ -303,9 +299,8 @@ extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, | |||
| 303 | size_t size); | 299 | size_t size); |
| 304 | extern size_t iommu_unmap_fast(struct iommu_domain *domain, | 300 | extern size_t iommu_unmap_fast(struct iommu_domain *domain, |
| 305 | unsigned long iova, size_t size); | 301 | unsigned long iova, size_t size); |
| 306 | extern size_t default_iommu_map_sg(struct iommu_domain *domain, unsigned long iova, | 302 | extern size_t iommu_map_sg(struct iommu_domain *domain, unsigned long iova, |
| 307 | struct scatterlist *sg,unsigned int nents, | 303 | struct scatterlist *sg,unsigned int nents, int prot); |
| 308 | int prot); | ||
| 309 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); | 304 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); |
| 310 | extern void iommu_set_fault_handler(struct iommu_domain *domain, | 305 | extern void iommu_set_fault_handler(struct iommu_domain *domain, |
| 311 | iommu_fault_handler_t handler, void *token); | 306 | iommu_fault_handler_t handler, void *token); |
| @@ -378,13 +373,6 @@ static inline void iommu_tlb_sync(struct iommu_domain *domain) | |||
| 378 | domain->ops->iotlb_sync(domain); | 373 | domain->ops->iotlb_sync(domain); |
| 379 | } | 374 | } |
| 380 | 375 | ||
| 381 | static inline size_t iommu_map_sg(struct iommu_domain *domain, | ||
| 382 | unsigned long iova, struct scatterlist *sg, | ||
| 383 | unsigned int nents, int prot) | ||
| 384 | { | ||
| 385 | return domain->ops->map_sg(domain, iova, sg, nents, prot); | ||
| 386 | } | ||
| 387 | |||
| 388 | /* PCI device grouping function */ | 376 | /* PCI device grouping function */ |
| 389 | extern struct iommu_group *pci_device_group(struct device *dev); | 377 | extern struct iommu_group *pci_device_group(struct device *dev); |
| 390 | /* Generic device grouping function */ | 378 | /* Generic device grouping function */ |
| @@ -698,4 +686,11 @@ const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode) | |||
| 698 | 686 | ||
| 699 | #endif /* CONFIG_IOMMU_API */ | 687 | #endif /* CONFIG_IOMMU_API */ |
| 700 | 688 | ||
| 689 | #ifdef CONFIG_IOMMU_DEBUGFS | ||
| 690 | extern struct dentry *iommu_debugfs_dir; | ||
| 691 | void iommu_debugfs_setup(void); | ||
| 692 | #else | ||
| 693 | static inline void iommu_debugfs_setup(void) {} | ||
| 694 | #endif | ||
| 695 | |||
| 701 | #endif /* __LINUX_IOMMU_H */ | 696 | #endif /* __LINUX_IOMMU_H */ |
