[PATCH v4 5/9] iommu/vt-d: Don't switch off swiotlb if use direct dma
Konrad Rzeszutek Wilk
konrad.wilk at oracle.com
Mon Jun 10 15:54:51 UTC 2019
On Mon, Jun 03, 2019 at 09:16:16AM +0800, Lu Baolu wrote:
> The direct dma implementation depends on swiotlb. Hence, don't
> switch of swiotlb since direct dma interfaces are used in this
s/of/off/
> driver.
But I think you really want to leave the code as is but change
the #ifdef to check for IOMMU_BOUNCE_PAGE and not CONFIG_SWIOTLB.
As one could disable IOMMU_BOUNCE_PAGE.
>
> Cc: Ashok Raj <ashok.raj at intel.com>
> Cc: Jacob Pan <jacob.jun.pan at linux.intel.com>
> Cc: Kevin Tian <kevin.tian at intel.com>
> Cc: Mika Westerberg <mika.westerberg at intel.com>
> Signed-off-by: Lu Baolu <baolu.lu at linux.intel.com>
> ---
> drivers/iommu/intel-iommu.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index d5a6c8064c56..235837c50719 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4625,9 +4625,6 @@ static int __init platform_optin_force_iommu(void)
> iommu_identity_mapping |= IDENTMAP_ALL;
>
> dmar_disabled = 0;
> -#if defined(CONFIG_X86) && defined(CONFIG_SWIOTLB)
> - swiotlb = 0;
> -#endif
> no_iommu = 0;
>
> return 1;
> @@ -4765,9 +4762,6 @@ int __init intel_iommu_init(void)
> }
> up_write(&dmar_global_lock);
>
> -#if defined(CONFIG_X86) && defined(CONFIG_SWIOTLB)
> - swiotlb = 0;
> -#endif
> dma_ops = &intel_dma_ops;
>
> init_iommu_pm_ops();
> --
> 2.17.1
>
More information about the iommu
mailing list