aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-01-21 16:32:27 +0100
committerJoerg Roedel <joerg.roedel@amd.com>2010-03-07 18:01:11 +0100
commit67651786948c360c3122b8a17cb1e59209d50880 (patch)
tree533a24ba14a513a99c19af4507dde499aaf1d9c5 /include/linux/iommu.h
parentiommu-api: Add iommu_map and iommu_unmap functions (diff)
downloadlinux-dev-67651786948c360c3122b8a17cb1e59209d50880.tar.xz
linux-dev-67651786948c360c3122b8a17cb1e59209d50880.zip
iommu-api: Add ->{un}map callbacks to iommu_ops
This patch adds new callbacks for mapping and unmapping pages to the iommu_ops structure. These callbacks are aware of page sizes which makes them different to the ->{un}map_range callbacks. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 6d0035bb1a0c..5a7a3d888dac 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -36,6 +36,10 @@ struct iommu_ops {
void (*domain_destroy)(struct iommu_domain *domain);
int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
+ int (*map)(struct iommu_domain *domain, unsigned long iova,
+ phys_addr_t paddr, int gfp_order, int prot);
+ int (*unmap)(struct iommu_domain *domain, unsigned long iova,
+ int gfp_order);
int (*map_range)(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot);
void (*unmap_range)(struct iommu_domain *domain, unsigned long iova,