Thread (1 message) 1 message, 1 author, 2021-04-05

Re: [PATCH v2 07/12] iommu: Hook up '->unmap_pages' driver callback

From: Lu Baolu <baolu.lu@linux.intel.com>
Date: 2021-04-05 06:11:22
Also in: linux-iommu

Hi,

On 4/2/21 9:34 AM, Isaac J. Manjarres wrote:
quoted hunk
  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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help