|
@@ -1573,10 +1573,10 @@ static size_t __iommu_unmap(struct iommu_domain *domain,
|
|
|
|
|
|
if (unlikely(ops->unmap == NULL ||
|
|
if (unlikely(ops->unmap == NULL ||
|
|
domain->pgsize_bitmap == 0UL))
|
|
domain->pgsize_bitmap == 0UL))
|
|
- return -ENODEV;
|
|
|
|
|
|
+ return 0;
|
|
|
|
|
|
if (unlikely(!(domain->type & __IOMMU_DOMAIN_PAGING)))
|
|
if (unlikely(!(domain->type & __IOMMU_DOMAIN_PAGING)))
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return 0;
|
|
|
|
|
|
/* find out the minimum page size supported */
|
|
/* find out the minimum page size supported */
|
|
min_pagesz = 1 << __ffs(domain->pgsize_bitmap);
|
|
min_pagesz = 1 << __ffs(domain->pgsize_bitmap);
|
|
@@ -1589,7 +1589,7 @@ static size_t __iommu_unmap(struct iommu_domain *domain,
|
|
if (!IS_ALIGNED(iova | size, min_pagesz)) {
|
|
if (!IS_ALIGNED(iova | size, min_pagesz)) {
|
|
pr_err("unaligned: iova 0x%lx size 0x%zx min_pagesz 0x%x\n",
|
|
pr_err("unaligned: iova 0x%lx size 0x%zx min_pagesz 0x%x\n",
|
|
iova, size, min_pagesz);
|
|
iova, size, min_pagesz);
|
|
- return -EINVAL;
|
|
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
pr_debug("unmap this: iova 0x%lx size 0x%zx\n", iova, size);
|
|
pr_debug("unmap this: iova 0x%lx size 0x%zx\n", iova, size);
|