Skip to content

Commit de9f8a9

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/dma: Clean up Kconfig
Although iommu-dma is a per-architecture chonce, that is currently implemented in a rather haphazard way. Selecting from the arch Kconfig was the original logical approach, but is complicated by having to manage dependencies; conversely, selecting from drivers ends up hiding the architecture dependency *too* well. Instead, let's just have it enable itself automatically when IOMMU API support is enabled for the relevant architectures. It can't get much clearer than that. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/2e33c8bc2b1bb478157b7964bfed976cb7466139.1660668998.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 29e9322 commit de9f8a9

4 files changed

Lines changed: 1 addition & 5 deletions

File tree

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ config ARM64
209209
select HAVE_KPROBES
210210
select HAVE_KRETPROBES
211211
select HAVE_GENERIC_VDSO
212-
select IOMMU_DMA if IOMMU_SUPPORT
213212
select IRQ_DOMAIN
214213
select IRQ_FORCED_THREADING
215214
select KASAN_VMALLOC if KASAN

drivers/iommu/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ config OF_IOMMU
137137

138138
# IOMMU-agnostic DMA-mapping layer
139139
config IOMMU_DMA
140-
bool
140+
def_bool ARM64 || IA64 || X86
141141
select DMA_OPS
142142
select IOMMU_API
143143
select IOMMU_IOVA
@@ -476,7 +476,6 @@ config VIRTIO_IOMMU
476476
depends on VIRTIO
477477
depends on (ARM64 || X86)
478478
select IOMMU_API
479-
select IOMMU_DMA
480479
select INTERVAL_TREE
481480
select ACPI_VIOT if ACPI
482481
help

drivers/iommu/amd/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ config AMD_IOMMU
99
select PCI_PASID
1010
select IOMMU_API
1111
select IOMMU_IOVA
12-
select IOMMU_DMA
1312
select IOMMU_IO_PGTABLE
1413
depends on X86_64 && PCI && ACPI && HAVE_CMPXCHG_DOUBLE
1514
help

drivers/iommu/intel/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ config INTEL_IOMMU
1919
select DMAR_TABLE
2020
select SWIOTLB
2121
select IOASID
22-
select IOMMU_DMA
2322
select PCI_ATS
2423
help
2524
DMA remapping (DMAR) devices support enables independent address

0 commit comments

Comments
 (0)