Message ID | 20221214180409.7354-1-palmer@rivosinc.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | RISC-V: Disable IPMMU_VMSA on rv32 | expand |
Context | Check | Description |
---|---|---|
conchuod/patch_count | success | Link |
conchuod/cover_letter | success | Single patches do not need cover letters |
conchuod/tree_selection | success | Guessed tree name to be for-next |
conchuod/fixes_present | success | Fixes tag not required for -next series |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/alphanumeric_selects | success | Out of order selects before the patch: 57 and now 57 |
conchuod/build_rv32_defconfig | success | Build OK |
conchuod/build_warn_rv64 | success | Errors and warnings before: 0 this patch: 0 |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 0 this patch: 0 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 4 lines checked |
conchuod/source_inline | success | Was 0 now: 0 |
conchuod/build_rv64_nommu_k210_defconfig | success | Build OK |
conchuod/verify_fixes | success | No Fixes tag |
conchuod/build_rv64_nommu_virt_defconfig | success | Build OK |
On 14 December 2022 10:04:09 GMT-08:00, Palmer Dabbelt <palmer@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://lore.kernel.org/all/202212142355.b7vf3Jh0-lkp@intel.com/ I hate selects, just ignores the dependency :( && !GENERIC_ATOMIC64 [=y]) > >linux/drivers/iommu/io-pgtable-arm.c: Assembler messages: >linux/drivers/iommu/io-pgtable-arm.c:330: Error: unrecognized opcode `lr.d s4,0(s1)' >linux/drivers/iommu/io-pgtable-arm.c:332: Error: unrecognized opcode `sc.d.rl a5,s6,0(s1)' >make[5]: *** [linux/scripts/Makefile.build:250: drivers/iommu/io-pgtable-arm.o] Error 1 >make[4]: *** [linux/scripts/Makefile.build:502: drivers/iommu] Error 2 >make[3]: *** [linux/scripts/Makefile.build:502: drivers] Error 2 > >Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> > >--- > >This one seems pretty ugly, but I like to at least have a workaround for >the allmodconfig failures before sending up a PR. >--- > arch/riscv/configs/32-bit.config | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/arch/riscv/configs/32-bit.config b/arch/riscv/configs/32-bit.config >index f6af0f708df4..7a2fa9b37b1c 100644 >--- a/arch/riscv/configs/32-bit.config >+++ b/arch/riscv/configs/32-bit.config >@@ -2,3 +2,4 @@ CONFIG_ARCH_RV32I=y > CONFIG_32BIT=y > # CONFIG_PORTABLE is not set > CONFIG_NONPORTABLE=y >+CONFIG_IPMMU_VMSA=n
On 2022-12-14 19:46, Conor Dooley wrote: > > > On 14 December 2022 10:04:09 GMT-08:00, Palmer Dabbelt <palmer@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://lore.kernel.org/all/202212142355.b7vf3Jh0-lkp@intel.com/ > > 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. Thanks, Robin. >> linux/drivers/iommu/io-pgtable-arm.c: Assembler messages: >> linux/drivers/iommu/io-pgtable-arm.c:330: Error: unrecognized opcode `lr.d s4,0(s1)' >> linux/drivers/iommu/io-pgtable-arm.c:332: Error: unrecognized opcode `sc.d.rl a5,s6,0(s1)' >> make[5]: *** [linux/scripts/Makefile.build:250: drivers/iommu/io-pgtable-arm.o] Error 1 >> make[4]: *** [linux/scripts/Makefile.build:502: drivers/iommu] Error 2 >> make[3]: *** [linux/scripts/Makefile.build:502: drivers] Error 2 >> >> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> >> >> --- >> >> This one seems pretty ugly, but I like to at least have a workaround for >> the allmodconfig failures before sending up a PR. >> --- >> arch/riscv/configs/32-bit.config | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/riscv/configs/32-bit.config b/arch/riscv/configs/32-bit.config >> index f6af0f708df4..7a2fa9b37b1c 100644 >> --- a/arch/riscv/configs/32-bit.config >> +++ b/arch/riscv/configs/32-bit.config >> @@ -2,3 +2,4 @@ CONFIG_ARCH_RV32I=y >> CONFIG_32BIT=y >> # CONFIG_PORTABLE is not set >> CONFIG_NONPORTABLE=y >> +CONFIG_IPMMU_VMSA=n >
Hi, > -----Original Message----- > From: Robin Murphy <robin.murphy@arm.com> > Sent: 14 December 2022 21:04 > To: Conor Dooley <conor@kernel.org>; linux-riscv@lists.infradead.org; Palmer Dabbelt > <palmer@rivosinc.com>; arnd@arndb.de; iommu@lists.linux.dev > Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@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@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
On 2022-12-14 21:40, Prabhakar Mahadev Lad wrote: > Hi, > >> -----Original Message----- >> From: Robin Murphy <robin.murphy@arm.com> >> Sent: 14 December 2022 21:04 >> To: Conor Dooley <conor@kernel.org>; linux-riscv@lists.infradead.org; Palmer Dabbelt >> <palmer@rivosinc.com>; arnd@arndb.de; iommu@lists.linux.dev >> Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@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@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? Seems fair to me, especially if it also means hiding a pointless choice for a normal interactive config :) Cheers, Robin. > --- 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
Hi Prabhakar, On Wed, Dec 14, 2022 at 10:40 PM Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote: > > From: Robin Murphy <robin.murphy@arm.com> > > On 2022-12-14 19:46, Conor Dooley wrote: > > > On 14 December 2022 10:04:09 GMT-08:00, Palmer Dabbelt <palmer@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) 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 (like we sort of had before commit 97215a7df4351fdd ("iommu/renesas: Expand COMPILE_TEST coverage") would fix that. > select IOMMU_API > select IOMMU_IO_PGTABLE_LPAE > select ARM_DMA_USE_IOMMU Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: 15 December 2022 09:05 > To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com> > Cc: Robin Murphy <robin.murphy@arm.com>; Conor Dooley <conor@kernel.org>; linux- > riscv@lists.infradead.org; Palmer Dabbelt <palmer@rivosinc.com>; arnd@arndb.de; iommu@lists.linux.dev; > Linux-Renesas <linux-renesas-soc@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@bp.renesas.com> > wrote: > > > From: Robin Murphy <robin.murphy@arm.com> On 2022-12-14 19:46, Conor > > > Dooley wrote: > > > > On 14 December 2022 10:04:09 GMT-08:00, Palmer Dabbelt <palmer@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
diff --git a/arch/riscv/configs/32-bit.config b/arch/riscv/configs/32-bit.config index f6af0f708df4..7a2fa9b37b1c 100644 --- a/arch/riscv/configs/32-bit.config +++ b/arch/riscv/configs/32-bit.config @@ -2,3 +2,4 @@ CONFIG_ARCH_RV32I=y CONFIG_32BIT=y # CONFIG_PORTABLE is not set CONFIG_NONPORTABLE=y +CONFIG_IPMMU_VMSA=n
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] && !GENERIC_ATOMIC64 [=y]) linux/drivers/iommu/io-pgtable-arm.c: Assembler messages: linux/drivers/iommu/io-pgtable-arm.c:330: Error: unrecognized opcode `lr.d s4,0(s1)' linux/drivers/iommu/io-pgtable-arm.c:332: Error: unrecognized opcode `sc.d.rl a5,s6,0(s1)' make[5]: *** [linux/scripts/Makefile.build:250: drivers/iommu/io-pgtable-arm.o] Error 1 make[4]: *** [linux/scripts/Makefile.build:502: drivers/iommu] Error 2 make[3]: *** [linux/scripts/Makefile.build:502: drivers] Error 2 Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> --- This one seems pretty ugly, but I like to at least have a workaround for the allmodconfig failures before sending up a PR. --- arch/riscv/configs/32-bit.config | 1 + 1 file changed, 1 insertion(+)