Re: [PATCH v5 5/7] dma-iommu: Check CONFIG_SWIOTLB more broadly

2021-08-16 Thread Christoph Hellwig
> - if (IS_ENABLED(CONFIG_SWIOTLB) && dev_is_untrusted(dev) && > + if (IS_ENABLED(CONFIG_SWIOTLB) && dev_use_swiotlb(dev) && > iova_offset(iovad, phys | size)) { This can drop the explicit CONFIG_SWIOTLB check now (and make the remaining conditional fit onto a single line).

[PATCH v5 5/7] dma-iommu: Check CONFIG_SWIOTLB more broadly

2021-08-15 Thread David Stevens
From: David Stevens Introduce a new dev_use_swiotlb function to guard swiotlb code, instead of overloading dev_is_untrusted. This allows CONFIG_SWIOTLB to be checked more broadly, so the swiotlb related code can be removed more aggressively. Signed-off-by: David Stevens Reviewed-by: Robin