Skip to content

Commit b4ceb4a

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu: Tidy up Kconfig for SoC IOMMUs
Wacky COMPILE_TEST dependencies based on who used to define dev_archdata.iommu can go. Dependencies on ARM or ARM64 already implied by the ARCH_* platform selection can go. The entire IOMMU_SUPPORT menu already depends on MMU, so those can go. IOMMU_DMA is for the architecture's DMA API implementation to choose, and its interface to IOMMU drivers is properly stubbed out if disabled, so dependencies on or selections of that can go (AMD_IOMMU is the current exception since the x86 drivers have to provide their own entire dma_map_ops implementation). Since commit ed6ccf1 ("dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA"), drivers which simply use the dma-mapping API should not need to depend on HAS_DMA, so those can go. And a long-dead option for code removed from the MSM driver 4 years ago can also go. Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/7fb9c74dc6bd12a4619ca44c92408e91352f1be0.1593791968.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent 557d4be commit b4ceb4a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

drivers/iommu/Kconfig

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ config MSM_IOMMU
128128

129129
If unsure, say N here.
130130

131-
config IOMMU_PGTABLES_L2
132-
def_bool y
133-
depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
134-
135131
# AMD IOMMU support
136132
config AMD_IOMMU
137133
bool "AMD IOMMU support"
@@ -274,7 +270,6 @@ config IRQ_REMAP
274270
# OMAP IOMMU support
275271
config OMAP_IOMMU
276272
bool "OMAP IOMMU Support"
277-
depends on ARM && MMU || (COMPILE_TEST && (ARM || ARM64 || IA64 || SPARC))
278273
depends on ARCH_OMAP2PLUS || COMPILE_TEST
279274
select IOMMU_API
280275
help
@@ -292,7 +287,6 @@ config OMAP_IOMMU_DEBUG
292287

293288
config ROCKCHIP_IOMMU
294289
bool "Rockchip IOMMU Support"
295-
depends on ARM || ARM64 || (COMPILE_TEST && (ARM64 || IA64 || SPARC))
296290
depends on ARCH_ROCKCHIP || COMPILE_TEST
297291
select IOMMU_API
298292
select ARM_DMA_USE_IOMMU
@@ -308,7 +302,6 @@ config SUN50I_IOMMU
308302
depends on ARCH_SUNXI || COMPILE_TEST
309303
select ARM_DMA_USE_IOMMU
310304
select IOMMU_API
311-
select IOMMU_DMA
312305
help
313306
Support for the IOMMU introduced in the Allwinner H6 SoCs.
314307

@@ -335,7 +328,7 @@ config TEGRA_IOMMU_SMMU
335328

336329
config EXYNOS_IOMMU
337330
bool "Exynos IOMMU Support"
338-
depends on ARCH_EXYNOS && MMU || (COMPILE_TEST && (ARM || ARM64 || IA64 || SPARC))
331+
depends on ARCH_EXYNOS || COMPILE_TEST
339332
depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes
340333
select IOMMU_API
341334
select ARM_DMA_USE_IOMMU
@@ -358,7 +351,7 @@ config EXYNOS_IOMMU_DEBUG
358351

359352
config IPMMU_VMSA
360353
bool "Renesas VMSA-compatible IPMMU"
361-
depends on ARM || IOMMU_DMA
354+
depends on ARM || ARM64
362355
depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
363356
select IOMMU_API
364357
select IOMMU_IO_PGTABLE_LPAE
@@ -380,7 +373,7 @@ config SPAPR_TCE_IOMMU
380373
# ARM IOMMU support
381374
config ARM_SMMU
382375
tristate "ARM Ltd. System MMU (SMMU) Support"
383-
depends on (ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)) && MMU
376+
depends on ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)
384377
select IOMMU_API
385378
select IOMMU_IO_PGTABLE_LPAE
386379
select ARM_DMA_USE_IOMMU if ARM
@@ -466,11 +459,9 @@ config S390_AP_IOMMU
466459

467460
config MTK_IOMMU
468461
bool "MTK IOMMU Support"
469-
depends on HAS_DMA
470462
depends on ARCH_MEDIATEK || COMPILE_TEST
471463
select ARM_DMA_USE_IOMMU
472464
select IOMMU_API
473-
select IOMMU_DMA
474465
select IOMMU_IO_PGTABLE_ARMV7S
475466
select MEMORY
476467
select MTK_SMI

0 commit comments

Comments
 (0)