aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2016-07-05 13:07:53 +0200
committerJoerg Roedel <jroedel@suse.de>2016-07-13 12:46:05 +0200
commit33b21a6b203f70e2012b02753134e59c3ab38779 (patch)
treedee32522644e5dd8b3e2bc52169eae2ea6facf50 /include/linux/iommu.h
parentiommu/amd: Init unity mappings only for dma_ops domains (diff)
downloadwireguard-linux-33b21a6b203f70e2012b02753134e59c3ab38779.tar.xz
wireguard-linux-33b21a6b203f70e2012b02753134e59c3ab38779.zip
iommu: Add apply_dm_region call-back to iommu-ops
This new call-back will be used by the iommu driver to do reserve the given dm_region in its iova space before the mapping is created. The call-back is temporary until the dma-ops implementation is part of the common iommu code. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 664683aedcce..a35fb8b42e1a 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -152,6 +152,7 @@ struct iommu_dm_region {
* @domain_set_attr: Change domain attributes
* @get_dm_regions: Request list of direct mapping requirements for a device
* @put_dm_regions: Free list of direct mapping requirements for a device
+ * @apply_dm_region: Temporary helper call-back for iova reserved ranges
* @domain_window_enable: Configure and enable a particular window for a domain
* @domain_window_disable: Disable a particular window for a domain
* @domain_set_windows: Set the number of windows for a domain
@@ -186,6 +187,8 @@ struct iommu_ops {
/* Request/Free a list of direct mapping requirements for a device */
void (*get_dm_regions)(struct device *dev, struct list_head *list);
void (*put_dm_regions)(struct device *dev, struct list_head *list);
+ void (*apply_dm_region)(struct device *dev, struct iommu_domain *domain,
+ struct iommu_dm_region *region);
/* Window handling functions */
int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr,