iommu/amd: Add support for IOMMU default DMA mode build options
authorZhen Lei <thunder.leizhen@huawei.com>
Mon, 12 Jul 2021 11:12:19 +0000 (19:12 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 26 Jul 2021 11:27:38 +0000 (13:27 +0200)
commit02252b3bfe9f98770a8d902925711676ff5bd766
tree37d392700b92050d9f12ca8d6d1bba5f766f2c2d
parentd0e108b8e962e0aae65dc74ffda63b93b6ef32f4
iommu/amd: Add support for IOMMU default DMA mode build options

Make IOMMU_DEFAULT_LAZY default for when AMD_IOMMU config is set, which
matches current behaviour.

For "fullflush" param, just call iommu_set_dma_strict(true) directly.

Since we get a strict vs lazy mode print already in iommu_subsys_init(),
and maintain a deprecation print when "fullflush" param is passed, drop the
prints in amd_iommu_init_dma_ops().

Finally drop global flag amd_iommu_unmap_flush, as it has no longer has any
purpose.

[jpg: Rebase for relocated file and drop amd_iommu_unmap_flush]

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1626088340-5838-6-git-send-email-john.garry@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/Kconfig
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c
drivers/iommu/amd/iommu.c