iommu/dma: Check CONFIG_SWIOTLB more broadly
authorDavid Stevens <stevensd@chromium.org>
Wed, 29 Sep 2021 02:32:58 +0000 (11:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:24:17 +0000 (14:24 +0200)
commit52d23f5f091509acda49b6b38edad96f175c06ff
tree01479d6dc82b94d7d556d14acdeca846b4299d87
parentbc05d84824c0d1deba7a36bc63785d611833c513
iommu/dma: Check CONFIG_SWIOTLB more broadly

commit 2e727bffbe93750a13d2414f3ce43de2f21600d2 upstream.

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 <stevensd@chromium.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210929023300.335969-6-stevensd@google.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Cc: Mario Limonciello <Mario.Limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/dma-iommu.c