Эх сурвалжийг харах

iommu: Disable on !MMU builds

A lot of the IOMMU support code does not build if the CPU does
not have an MMU itself, and it's not clear if there is any
use case for it, so let's just disable it and wait for anybody
to need it.

This avoids randconfig errors like

../arch/arm/mm/dma-mapping.c: In function '__iommu_alloc_remap':
../arch/arm/mm/dma-mapping.c:1278:34: error: 'VM_ARM_DMA_CONSISTENT' undeclared (first use in this function)
  area = get_vm_area_caller(size, VM_ARM_DMA_CONSISTENT | VM_USERMAP,
                                  ^
../arch/arm/mm/dma-mapping.c:1278:34: note: each undeclared identifier is reported only once for each function it appears in
../arch/arm/mm/dma-mapping.c: In function '__atomic_get_pages':
../arch/arm/mm/dma-mapping.c:1358:27: error: 'atomic_pool' undeclared (first use in this function)
  struct dma_pool *pool = &atomic_pool;

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Arnd Bergmann 10 жил өмнө
parent
commit
e5144c9375

+ 5 - 3
drivers/iommu/Kconfig

@@ -4,6 +4,7 @@ config IOMMU_API
 
 
 menuconfig IOMMU_SUPPORT
 menuconfig IOMMU_SUPPORT
 	bool "IOMMU Hardware Support"
 	bool "IOMMU Hardware Support"
+	depends on MMU
 	default y
 	default y
 	---help---
 	---help---
 	  Say Y here if you want to compile device drivers for IO Memory
 	  Say Y here if you want to compile device drivers for IO Memory
@@ -144,7 +145,7 @@ config IRQ_REMAP
 # OMAP IOMMU support
 # OMAP IOMMU support
 config OMAP_IOMMU
 config OMAP_IOMMU
 	bool "OMAP IOMMU Support"
 	bool "OMAP IOMMU Support"
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS && MMU
 	select IOMMU_API
 	select IOMMU_API
 
 
 config OMAP_IOMMU_DEBUG
 config OMAP_IOMMU_DEBUG
@@ -191,7 +192,7 @@ config TEGRA_IOMMU_SMMU
 
 
 config EXYNOS_IOMMU
 config EXYNOS_IOMMU
 	bool "Exynos IOMMU Support"
 	bool "Exynos IOMMU Support"
-	depends on ARCH_EXYNOS && ARM
+	depends on ARCH_EXYNOS && ARM && MMU
 	select IOMMU_API
 	select IOMMU_API
 	select ARM_DMA_USE_IOMMU
 	select ARM_DMA_USE_IOMMU
 	help
 	help
@@ -220,7 +221,7 @@ config SHMOBILE_IPMMU_TLB
 config SHMOBILE_IOMMU
 config SHMOBILE_IOMMU
 	bool "IOMMU for Renesas IPMMU/IPMMUI"
 	bool "IOMMU for Renesas IPMMU/IPMMUI"
 	default n
 	default n
-	depends on ARM
+	depends on ARM && MMU
 	depends on ARCH_SHMOBILE || COMPILE_TEST
 	depends on ARCH_SHMOBILE || COMPILE_TEST
 	select IOMMU_API
 	select IOMMU_API
 	select ARM_DMA_USE_IOMMU
 	select ARM_DMA_USE_IOMMU
@@ -309,6 +310,7 @@ config SPAPR_TCE_IOMMU
 config ARM_SMMU
 config ARM_SMMU
 	bool "ARM Ltd. System MMU (SMMU) Support"
 	bool "ARM Ltd. System MMU (SMMU) Support"
 	depends on ARM64 || (ARM_LPAE && OF)
 	depends on ARM64 || (ARM_LPAE && OF)
+	depends on MMU
 	select IOMMU_API
 	select IOMMU_API
 	select ARM_DMA_USE_IOMMU if ARM
 	select ARM_DMA_USE_IOMMU if ARM
 	help
 	help