This is a note to let you know that I've just added the patch titled iommu: Make IPMMU_VMSA dependencies more strict to the 6.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iommu-make-ipmmu_vmsa-dependencies-more-strict.patch and it can be found in the queue-6.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit b741d19d92c24f5c12c39db4ad6294121269b641 Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Date: Thu Mar 30 09:58:17 2023 -0700 iommu: Make IPMMU_VMSA dependencies more strict [ Upstream commit e332003bb216a9f91e08004b9e2de0745f321290 ] 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@xxxxxxxxxxxxx> Suggested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Joerg Roedel <joro@xxxxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Robin Murphy <robin.murphy@xxxxxxx> Cc: iommu@xxxxxxxxxxxxxxx Cc: Conor Dooley <conor@xxxxxxxxxx> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> Reviewed-by: Robin Murphy <robin.murphy@xxxxxxx> Link: https://lore.kernel.org/r/20230330165817.21920-1-rdunlap@xxxxxxxxxxxxx Signed-off-by: Joerg Roedel <jroedel@xxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 889c7efd050bc..18e68fbaec884 100644 --- 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