[PATCH] RISC-V: Disable IPMMU_VMSA on rv32
Prabhakar Mahadev Lad
prabhakar.mahadev-lad.rj at bp.renesas.com
Wed Dec 14 13:40:07 PST 2022
Hi,
> -----Original Message-----
> From: Robin Murphy <robin.murphy at arm.com>
> Sent: 14 December 2022 21:04
> To: Conor Dooley <conor at kernel.org>; linux-riscv at lists.infradead.org; Palmer Dabbelt
> <palmer at rivosinc.com>; arnd at arndb.de; iommu at lists.linux.dev
> Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj at bp.renesas.com>
> Subject: Re: [PATCH] RISC-V: Disable IPMMU_VMSA on rv32
>
> On 2022-12-14 19:46, Conor Dooley wrote:
> >
> >
> > On 14 December 2022 10:04:09 GMT-08:00, Palmer Dabbelt <palmer at rivosinc.com> wrote:
> >> Without this I get a Kconfig warning and then subsequent build
> >> failure when building allmodconfig on rv32.
> >>
> >> WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE
> >> Depends on [n]: IOMMU_SUPPORT [=y] && (ARM || ARM64 || COMPILE_TEST [=y] && !GENERIC_ATOMIC64
> [=y])
> >> Selected by [y]:
> >> - IPMMU_VMSA [=y] && IOMMU_SUPPORT [=y] && (ARCH_RENESAS [=y] ||
> >> COMPILE_TEST [=y]
> >
> > This here is your problem afaict
> > I got a report from lkp about it yesterday, "blaming" Prabhakar for it:
> > https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
> > .kernel.org%2Fall%2F202212142355.b7vf3Jh0-lkp%40intel.com%2F&data=
> > 05%7C01%7Cprabhakar.mahadev-lad.rj%40bp.renesas.com%7Ca51ccd27ccda45e7
> > 53c208dade16c553%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C63806648
> > 6632283001%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
> > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FshRCpnIoU0b
> > c38MYnesotcgOV4JT%2FXVOidbDMpAWbc%3D&reserved=0
> >
> > I hate selects, just ignores the dependency :(
> >
> > && !GENERIC_ATOMIC64 [=y])
>
> I think the existing assumption was that ARCH_RENESAS implied !GENERIC_ATOMIC64. If that is no longer
> true then please feel free to adjust drivers/iommu/Kconfig to suit.
>
IPMMU is not available on Renesas RISCV SoCs, so maybe something like below?
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -283,7 +283,7 @@ config EXYNOS_IOMMU_DEBUG
config IPMMU_VMSA
bool "Renesas VMSA-compatible IPMMU"
- depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
+ depends on (ARCH_RENESAS && !RISCV) || (COMPILE_TEST && !GENERIC_ATOMIC64)
select IOMMU_API
select IOMMU_IO_PGTABLE_LPAE
select ARM_DMA_USE_IOMMU
Cheers,
Prabhakar
More information about the linux-riscv
mailing list