Skip to contentSkip to conversation

iommu/renesas: Support riscv compile

PATCH In review [email protected] 2 participants 3 messages Dec 15, 2022 – Dec 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/renesas: Support riscv compile

From: Guo Ren <[email protected]>

After riscv selects ARCH_RENESAS, we need to add ARM64 || ARM dependency here.

---
 drivers/iommu/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/Kconfig +1 -0
index dc5f7a156ff5..746b95b9f345 100644
@@ -283,6 +283,7 @@ config EXYNOS_IOMMU_DEBUG
 
 config IPMMU_VMSA
 	bool "Renesas VMSA-compatible IPMMU"
+	depends on ARM64 || ARM
 	depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
 	select IOMMU_API
 	select IOMMU_IO_PGTABLE_LPAE
Signature · 1 line
2.36.1
reviewer
#1 lore raw
Quoted 4 lines · On 2022-12-15 07:32, [email protected] wrote:

From: Guo Ren <[email protected]>

After riscv selects ARCH_RENESAS, we need to add ARM64 || ARM dependency here.

This effectively removes all the extra COMPILE_TEST coverage we've been enjoying. FWIW I prefer Geert's suggestion to separate the real functional dependency from implicit assumptions about ARCH_RENESAS, with something like:

	depends on ARCH_RENESAS || COMPILE_TEST
	depends on !GENERIC_ATOMIC64	#for IOMMU_IO_PGTABLE_LPAE

Thanks,
Robin.

Quoted 19 lines
---
  drivers/iommu/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/iommu/Kconfig +1 -0
index dc5f7a156ff5..746b95b9f345 100644
@@ -283,6 +283,7 @@ config EXYNOS_IOMMU_DEBUG
 
  config IPMMU_VMSA
  	bool "Renesas VMSA-compatible IPMMU"
+	depends on ARM64 || ARM
  	depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
  	select IOMMU_API
  	select IOMMU_IO_PGTABLE_LPAE
author
#2 lore raw
Quoted 7 lines · Robin Murphy
Quoted 4 lines · On 2022-12-15 07:32, [email protected] wrote:

From: Guo Ren <[email protected]>

After riscv selects ARCH_RENESAS, we need to add ARM64 || ARM dependency here.

Quoted 7 lines

This effectively removes all the extra COMPILE_TEST coverage we've been enjoying. FWIW I prefer Geert's suggestion to separate the real functional dependency from implicit assumptions about ARCH_RENESAS, with something like:

depends on ARCH_RENESAS || COMPILE_TEST
depends on !GENERIC_ATOMIC64 #for IOMMU_IO_PGTABLE_LPAE

The problem is from clang version 16.0.0, and gcc version 12.2.0 () is okay. I didn't recognize COMPILE_TEST could utilize the x86(another arch) to test the arm driver.

How About:

drivers/iommu/Kconfig +1 -0
index dc5f7a156ff5..a2e259da5a6a 100644
@@ -283,6 +283,7 @@ config EXYNOS_IOMMU_DEBUG
 
 config IPMMU_VMSA
        bool "Renesas VMSA-compatible IPMMU"
+       depends on !RISCV
        depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
        select IOMMU_API
        select IOMMU_IO_PGTABLE_LPAE
Quoted 17 lines

Thanks,
Robin.

Quoted 13 lines
---
  drivers/iommu/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/iommu/Kconfig +0 -0
index dc5f7a156ff5..746b95b9f345 100644
@@ -283,6 +283,7 @@ config EXYNOS_IOMMU_DEBUG
 
Quoted 6 lines

drivers/iommu/Kconfig config EXYNOS_IOMMU_DEBUG · line 289

Quoted 6 lines
drivers/iommu/Kconfig +1 -0
  config IPMMU_VMSA
      bool "Renesas VMSA-compatible IPMMU"
+     depends on ARM64 || ARM
      depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
      select IOMMU_API
      select IOMMU_IO_PGTABLE_LPAE

--
Best Regards
Guo Ren