Skip to content

Commit 6d59603

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/amd: Prepare for multiple DMA domain types
The DMA ops reset/setup can simply be unconditional, since iommu-dma already knows only to touch DMA domains. Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/6450b4f39a5a086d505297b4a53ff1e4a7a0fe7c.1628682049.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent bf3aed4 commit 6d59603

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,14 +1707,9 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev)
17071707

17081708
static void amd_iommu_probe_finalize(struct device *dev)
17091709
{
1710-
struct iommu_domain *domain;
1711-
17121710
/* Domains are initialized for this device - have a look what we ended up with */
1713-
domain = iommu_get_domain_for_dev(dev);
1714-
if (domain->type == IOMMU_DOMAIN_DMA)
1715-
iommu_setup_dma_ops(dev, 0, U64_MAX);
1716-
else
1717-
set_dma_ops(dev, NULL);
1711+
set_dma_ops(dev, NULL);
1712+
iommu_setup_dma_ops(dev, 0, U64_MAX);
17181713
}
17191714

17201715
static void amd_iommu_release_device(struct device *dev)

0 commit comments

Comments
 (0)