[PATCH] RISC-V: Disable IPMMU_VMSA on rv32

Prabhakar Mahadev Lad prabhakar.mahadev-lad.rj at bp.renesas.com
Thu Dec 15 01:14:51 PST 2022


Hi Geert,

> -----Original Message-----
> From: Geert Uytterhoeven <geert at linux-m68k.org>
> Sent: 15 December 2022 09:05
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj at bp.renesas.com>
> Cc: Robin Murphy <robin.murphy at arm.com>; 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;
> Linux-Renesas <linux-renesas-soc at vger.kernel.org>
> Subject: Re: [PATCH] RISC-V: Disable IPMMU_VMSA on rv32
> 
> Hi Prabhakar,
> 
> On Wed, Dec 14, 2022 at 10:40 PM Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj at bp.renesas.com>
> wrote:
> > > From: Robin Murphy <robin.murphy at arm.com> 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%2F
> > > > lore
> > > > .kernel.org%2Fall%2F202212142355.b7vf3Jh0-lkp%40intel.com%2F&d
> > > > ata=
> > > > 05%7C01%7Cprabhakar.mahadev-lad.rj%40bp.renesas.com%7Ca51ccd27ccda
> > > > 45e7
> > > > 53c208dade16c553%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6380
> > > > 6648
> > > > 6632283001%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2l
> > > > uMzI
> > > > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FshRCpnI
> > > > oU0b
> > > > 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)
> 
> Negative dependencies on a symbol like that tend to need future extension.
> 
> What about
> 
>     depends on ARCH_RENESAS || COMPILE_TEST
>     depends on !GENERIC_ATOMIC64
> 
> instead?
> 
> That does mean the question will show up on RV64, too.
> Adding
> 
>     depends on ARM || ARM64 || COMPILE_TEST
> 
Guo has posted a similar patch [0].

[0] https://patchwork.kernel.org/project/linux-riscv/patch/20221215073212.1966823-1-guoren@kernel.org/

Cheers,
Prabhakar



More information about the linux-riscv mailing list