[PATCH v2 07/12] iommu: Hook up '->unmap_pages' driver callback
Lu Baolu
baolu.lu at linux.intel.com
Mon Apr 5 07:00:02 BST 2021
Hi,
On 4/2/21 9:34 AM, Isaac J. Manjarres wrote:
> static size_t __iommu_unmap(struct iommu_domain *domain,
> unsigned long iova, size_t size,
> struct iommu_iotlb_gather *iotlb_gather)
> @@ -2476,7 +2519,7 @@ static size_t __iommu_unmap(struct iommu_domain *domain,
> unsigned long orig_iova = iova;
> unsigned int min_pagesz;
>
> - if (unlikely(ops->unmap == NULL ||
> + if (unlikely((ops->unmap == NULL && ops->unmap_pages == NULL) ||
> domain->pgsize_bitmap == 0UL))
This change should also be applied to __iommu_map() path. And perhaps
could be:
if (unlikely(!(ops->unmap || ops->unmap_pages) || !domain->pgsize_bitmap))
Best regards,
baolu
More information about the linux-arm-kernel
mailing list