diff options
Diffstat (limited to 'drivers/iommu/omap-iommu.c')
-rw-r--r-- | drivers/iommu/omap-iommu.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 8f32b2bf7587..ad80b1d0d099 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -1019,12 +1019,11 @@ static void iopte_cachep_ctor(void *iopte) | |||
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | static int omap_iommu_map(struct iommu_domain *domain, unsigned long da, | 1021 | static int omap_iommu_map(struct iommu_domain *domain, unsigned long da, |
1022 | phys_addr_t pa, int order, int prot) | 1022 | phys_addr_t pa, size_t bytes, int prot) |
1023 | { | 1023 | { |
1024 | struct omap_iommu_domain *omap_domain = domain->priv; | 1024 | struct omap_iommu_domain *omap_domain = domain->priv; |
1025 | struct omap_iommu *oiommu = omap_domain->iommu_dev; | 1025 | struct omap_iommu *oiommu = omap_domain->iommu_dev; |
1026 | struct device *dev = oiommu->dev; | 1026 | struct device *dev = oiommu->dev; |
1027 | size_t bytes = PAGE_SIZE << order; | ||
1028 | struct iotlb_entry e; | 1027 | struct iotlb_entry e; |
1029 | int omap_pgsz; | 1028 | int omap_pgsz; |
1030 | u32 ret, flags; | 1029 | u32 ret, flags; |
@@ -1049,19 +1048,16 @@ static int omap_iommu_map(struct iommu_domain *domain, unsigned long da, | |||
1049 | return ret; | 1048 | return ret; |
1050 | } | 1049 | } |
1051 | 1050 | ||
1052 | static int omap_iommu_unmap(struct iommu_domain *domain, unsigned long da, | 1051 | static size_t omap_iommu_unmap(struct iommu_domain *domain, unsigned long da, |
1053 | int order) | 1052 | size_t size) |
1054 | { | 1053 | { |
1055 | struct omap_iommu_domain *omap_domain = domain->priv; | 1054 | struct omap_iommu_domain *omap_domain = domain->priv; |
1056 | struct omap_iommu *oiommu = omap_domain->iommu_dev; | 1055 | struct omap_iommu *oiommu = omap_domain->iommu_dev; |
1057 | struct device *dev = oiommu->dev; | 1056 | struct device *dev = oiommu->dev; |
1058 | size_t unmap_size; | ||
1059 | 1057 | ||
1060 | dev_dbg(dev, "unmapping da 0x%lx order %d\n", da, order); | 1058 | dev_dbg(dev, "unmapping da 0x%lx size %u\n", da, size); |
1061 | 1059 | ||
1062 | unmap_size = iopgtable_clear_entry(oiommu, da); | 1060 | return iopgtable_clear_entry(oiommu, da); |
1063 | |||
1064 | return unmap_size ? get_order(unmap_size) : -EINVAL; | ||
1065 | } | 1061 | } |
1066 | 1062 | ||
1067 | static int | 1063 | static int |