* [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict
@ 2023-03-30 16:58 Randy Dunlap
2023-05-16 7:14 ` Conor Dooley
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Randy Dunlap @ 2023-03-30 16:58 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Geert Uytterhoeven, Joerg Roedel, Will Deacon,
Robin Murphy, iommu, Conor Dooley, Lad Prabhakar
On riscv64, linux-next-20233030 (and for several days earlier),
there is a kconfig warning:
WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE
Depends on [n]: IOMMU_SUPPORT [=y] && (ARM || ARM64 || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n]
Selected by [y]:
- IPMMU_VMSA [=y] && IOMMU_SUPPORT [=y] && (ARCH_RENESAS [=y] || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n]
and build errors:
riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L140':
io-pgtable-arm.c:(.init.text+0x1e8): undefined reference to `alloc_io_pgtable_ops'
riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L168':
io-pgtable-arm.c:(.init.text+0xab0): undefined reference to `free_io_pgtable_ops'
riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L140':
ipmmu-vmsa.c:(.text+0xbc4): undefined reference to `free_io_pgtable_ops'
riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L0 ':
ipmmu-vmsa.c:(.text+0x145e): undefined reference to `alloc_io_pgtable_ops'
Add ARM || ARM64 || COMPILE_TEST dependencies to IPMMU_VMSA to prevent
these issues, i.e., so that ARCH_RENESAS on RISC-V is not allowed.
This makes the ARCH dependencies become:
depends on (ARCH_RENESAS && (ARM || ARM64)) || COMPILE_TEST
but that can be a bit hard to read.
Fixes: 8292493c22c8 ("riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Will Deacon <will@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: iommu@lists.linux.dev
Cc: Conor Dooley <conor@kernel.org>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/iommu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff -- a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -287,6 +287,7 @@ config EXYNOS_IOMMU_DEBUG
config IPMMU_VMSA
bool "Renesas VMSA-compatible IPMMU"
depends on ARCH_RENESAS || COMPILE_TEST
+ depends on ARM || ARM64 || COMPILE_TEST
depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE
select IOMMU_API
select IOMMU_IO_PGTABLE_LPAE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict
2023-03-30 16:58 [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict Randy Dunlap
@ 2023-05-16 7:14 ` Conor Dooley
2023-05-16 11:51 ` Robin Murphy
2023-05-22 15:01 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-05-16 7:14 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Geert Uytterhoeven, Joerg Roedel, Will Deacon,
Robin Murphy, iommu, Conor Dooley, Lad Prabhakar
[-- Attachment #1: Type: text/plain, Size: 2590 bytes --]
On Thu, Mar 30, 2023 at 09:58:17AM -0700, Randy Dunlap wrote:
> On riscv64, linux-next-20233030 (and for several days earlier),
> there is a kconfig warning:
>
> WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE
> Depends on [n]: IOMMU_SUPPORT [=y] && (ARM || ARM64 || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n]
> Selected by [y]:
> - IPMMU_VMSA [=y] && IOMMU_SUPPORT [=y] && (ARCH_RENESAS [=y] || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n]
>
> and build errors:
>
> riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L140':
> io-pgtable-arm.c:(.init.text+0x1e8): undefined reference to `alloc_io_pgtable_ops'
> riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L168':
> io-pgtable-arm.c:(.init.text+0xab0): undefined reference to `free_io_pgtable_ops'
> riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L140':
> ipmmu-vmsa.c:(.text+0xbc4): undefined reference to `free_io_pgtable_ops'
> riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L0 ':
> ipmmu-vmsa.c:(.text+0x145e): undefined reference to `alloc_io_pgtable_ops'
>
> Add ARM || ARM64 || COMPILE_TEST dependencies to IPMMU_VMSA to prevent
> these issues, i.e., so that ARCH_RENESAS on RISC-V is not allowed.
>
> This makes the ARCH dependencies become:
> depends on (ARCH_RENESAS && (ARM || ARM64)) || COMPILE_TEST
> but that can be a bit hard to read.
>
> Fixes: 8292493c22c8 ("riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Cc: iommu@lists.linux.dev
> Cc: Conor Dooley <conor@kernel.org>
> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
This is still presenting as a problem for randconfig builds:
https://lore.kernel.org/all/54244db6-ff69-4cf8-894c-c3dd2f12df9c@infradead.org/
Could it get picked up please?
Thanks,
Conor.
> ---
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff -- a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -287,6 +287,7 @@ config EXYNOS_IOMMU_DEBUG
> config IPMMU_VMSA
> bool "Renesas VMSA-compatible IPMMU"
> depends on ARCH_RENESAS || COMPILE_TEST
> + depends on ARM || ARM64 || COMPILE_TEST
> depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE
> select IOMMU_API
> select IOMMU_IO_PGTABLE_LPAE
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict
2023-03-30 16:58 [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict Randy Dunlap
2023-05-16 7:14 ` Conor Dooley
@ 2023-05-16 11:51 ` Robin Murphy
2023-05-22 15:01 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2023-05-16 11:51 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Geert Uytterhoeven, Joerg Roedel, Will Deacon, iommu,
Conor Dooley, Lad Prabhakar
On 2023-03-30 17:58, Randy Dunlap wrote:
> On riscv64, linux-next-20233030 (and for several days earlier),
> there is a kconfig warning:
>
> WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE
> Depends on [n]: IOMMU_SUPPORT [=y] && (ARM || ARM64 || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n]
> Selected by [y]:
> - IPMMU_VMSA [=y] && IOMMU_SUPPORT [=y] && (ARCH_RENESAS [=y] || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n]
>
> and build errors:
>
> riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L140':
> io-pgtable-arm.c:(.init.text+0x1e8): undefined reference to `alloc_io_pgtable_ops'
> riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L168':
> io-pgtable-arm.c:(.init.text+0xab0): undefined reference to `free_io_pgtable_ops'
> riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L140':
> ipmmu-vmsa.c:(.text+0xbc4): undefined reference to `free_io_pgtable_ops'
> riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L0 ':
> ipmmu-vmsa.c:(.text+0x145e): undefined reference to `alloc_io_pgtable_ops'
>
> Add ARM || ARM64 || COMPILE_TEST dependencies to IPMMU_VMSA to prevent
> these issues, i.e., so that ARCH_RENESAS on RISC-V is not allowed.
>
> This makes the ARCH dependencies become:
> depends on (ARCH_RENESAS && (ARM || ARM64)) || COMPILE_TEST
> but that can be a bit hard to read.
If it helps,
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> Fixes: 8292493c22c8 ("riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Cc: iommu@lists.linux.dev
> Cc: Conor Dooley <conor@kernel.org>
> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff -- a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -287,6 +287,7 @@ config EXYNOS_IOMMU_DEBUG
> config IPMMU_VMSA
> bool "Renesas VMSA-compatible IPMMU"
> depends on ARCH_RENESAS || COMPILE_TEST
> + depends on ARM || ARM64 || COMPILE_TEST
> depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE
> select IOMMU_API
> select IOMMU_IO_PGTABLE_LPAE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict
2023-03-30 16:58 [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict Randy Dunlap
2023-05-16 7:14 ` Conor Dooley
2023-05-16 11:51 ` Robin Murphy
@ 2023-05-22 15:01 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2023-05-22 15:01 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Geert Uytterhoeven, Will Deacon, Robin Murphy,
iommu, Conor Dooley, Lad Prabhakar
On Thu, Mar 30, 2023 at 09:58:17AM -0700, Randy Dunlap wrote:
> ---
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
Applied for 6.4, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-22 15:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 16:58 [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict Randy Dunlap
2023-05-16 7:14 ` Conor Dooley
2023-05-16 11:51 ` Robin Murphy
2023-05-22 15:01 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox