summaryrefslogtreecommitdiff
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2021-08-02 18:00:28 +0300
committerJoerg Roedel <jroedel@suse.de>2021-08-02 18:00:28 +0300
commit1d65b90847219e4101dc09ecc1c8178b1d2331b8 (patch)
tree4d2872a267cba56f487ed429c4c3a2b7d1839837 /include/linux/iommu.h
parenta270be1b3fdfb6940dd692c859fdf9a7407047be (diff)
parent75cc1018a9e1e57d4ae43a101fc08a070894d439 (diff)
downloadlinux-1d65b90847219e4101dc09ecc1c8178b1d2331b8.tar.xz
Merge remote-tracking branch 'korg/core' into x86/amd
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 979a5ceeea55..e552ecfefcf7 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -180,7 +180,10 @@ struct iommu_iotlb_gather {
* @attach_dev: attach device to an iommu domain
* @detach_dev: detach device from an iommu domain
* @map: map a physically contiguous memory region to an iommu domain
+ * @map_pages: map a physically contiguous set of pages of the same size to
+ * an iommu domain.
* @unmap: unmap a physically contiguous memory region from an iommu domain
+ * @unmap_pages: unmap a number of pages of the same size from an iommu domain
* @flush_iotlb_all: Synchronously flush all hardware TLBs for this domain
* @iotlb_sync_map: Sync mappings created recently using @map to the hardware
* @iotlb_sync: Flush all queued ranges from the hardware TLBs and empty flush
@@ -229,8 +232,14 @@ struct iommu_ops {
void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
int (*map)(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot, gfp_t gfp);
+ int (*map_pages)(struct iommu_domain *domain, unsigned long iova,
+ phys_addr_t paddr, size_t pgsize, size_t pgcount,
+ int prot, gfp_t gfp, size_t *mapped);
size_t (*unmap)(struct iommu_domain *domain, unsigned long iova,
size_t size, struct iommu_iotlb_gather *iotlb_gather);
+ size_t (*unmap_pages)(struct iommu_domain *domain, unsigned long iova,
+ size_t pgsize, size_t pgcount,
+ struct iommu_iotlb_gather *iotlb_gather);
void (*flush_iotlb_all)(struct iommu_domain *domain);
void (*iotlb_sync_map)(struct iommu_domain *domain, unsigned long iova,
size_t size);
@@ -476,7 +485,7 @@ int iommu_enable_nesting(struct iommu_domain *domain);
int iommu_set_pgtable_quirks(struct iommu_domain *domain,
unsigned long quirks);
-void iommu_set_dma_strict(bool val);
+void iommu_set_dma_strict(void);
bool iommu_get_dma_strict(struct iommu_domain *domain);
extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev,