Skip to content

Commit 986a5f7

Browse files
geertujoergroedel
authored andcommitted
iommu/qcom: Depend on HAS_DMA to fix compile error
If NO_DMA=y: warning: (IPMMU_VMSA && ARM_SMMU && ARM_SMMU_V3 && QCOM_IOMMU) selects IOMMU_IO_PGTABLE_LPAE which has unmet direct dependencies (IOMMU_SUPPORT && HAS_DMA && (ARM || ARM64 || COMPILE_TEST && !GENERIC_ATOMIC64)) and drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_sync_pte': io-pgtable-arm.c:(.text+0x206): undefined reference to `bad_dma_ops' drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_free_pages': io-pgtable-arm.c:(.text+0x6a6): undefined reference to `bad_dma_ops' drivers/iommu/io-pgtable-arm.o: In function `__arm_lpae_alloc_pages': io-pgtable-arm.c:(.text+0x812): undefined reference to `bad_dma_ops' io-pgtable-arm.c:(.text+0x81c): undefined reference to `bad_dma_ops' io-pgtable-arm.c:(.text+0x862): undefined reference to `bad_dma_ops' drivers/iommu/io-pgtable-arm.o: In function `arm_lpae_run_tests': io-pgtable-arm.c:(.init.text+0x86): undefined reference to `alloc_io_pgtable_ops' io-pgtable-arm.c:(.init.text+0x47c): undefined reference to `free_io_pgtable_ops' drivers/iommu/qcom_iommu.o: In function `qcom_iommu_init_domain': qcom_iommu.c:(.text+0x1ce): undefined reference to `alloc_io_pgtable_ops' drivers/iommu/qcom_iommu.o: In function `qcom_iommu_domain_free': qcom_iommu.c:(.text+0x754): undefined reference to `free_io_pgtable_ops' QCOM_IOMMU selects IOMMU_IO_PGTABLE_LPAE, which bypasses its dependency on HAS_DMA. Make QCOM_IOMMU depend on HAS_DMA to fix this. Fixes: 0ae349a ("iommu/qcom: Add qcom_iommu") Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 3bd71e1 commit 986a5f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iommu/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ config QCOM_IOMMU
374374
# Note: iommu drivers cannot (yet?) be built as modules
375375
bool "Qualcomm IOMMU Support"
376376
depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
377+
depends on HAS_DMA
377378
select IOMMU_API
378379
select IOMMU_IO_PGTABLE_LPAE
379380
select ARM_DMA_USE_IOMMU

0 commit comments

Comments
 (0)