Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
In most cases this other symbol is an architecture or platform specific
symbol, or PCI.

Generic symbols and drivers without platform dependencies keep their
dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
cannot work anyway.

This simplifies the dependencies, and allows to improve compile-testing.

Signed-off-by: Geert Uytterhoeven <>
Reviewed-by: Mark Brown <>
Acked-by: Robin Murphy <>
Acked-by: Joerg Roedel <>
  - Add Acked-by,
  - Rebase to v4.17-rc1,

  - Add Reviewed-by, Acked-by,
  - Drop RFC state,
  - Split per subsystem.
 drivers/iommu/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index df171cb8582296b9..c76157e57f6ba4ba 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -23,7 +23,7 @@ config IOMMU_IO_PGTABLE
        bool "ARMv7/v8 Long Descriptor Format"
        select IOMMU_IO_PGTABLE
-       depends on HAS_DMA && (ARM || ARM64 || (COMPILE_TEST && 
+       depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
          Enable support for the ARM long descriptor pagetable format.
          This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page
@@ -42,7 +42,7 @@ config IOMMU_IO_PGTABLE_LPAE_SELFTEST
        bool "ARMv7/v8 Short Descriptor Format"
        select IOMMU_IO_PGTABLE
-       depends on HAS_DMA && (ARM || ARM64 || COMPILE_TEST)
+       depends on ARM || ARM64 || COMPILE_TEST
          Enable support for the ARM Short-descriptor pagetable format.
          This supports 32-bit virtual and physical addresses mapped using
@@ -376,7 +376,6 @@ config QCOM_IOMMU
        # Note: iommu drivers cannot (yet?) be built as modules
        bool "Qualcomm IOMMU Support"
        depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
-       depends on HAS_DMA
        select IOMMU_API
        select IOMMU_IO_PGTABLE_LPAE
        select ARM_DMA_USE_IOMMU

iommu mailing list

Reply via email to