linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] soc: renesas: make ARCH_R9A07G043 depend on !DMA_DIRECT_REMAP
@ 2023-12-11 22:06 Conor Dooley
  2023-12-12  8:19 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2023-12-11 22:06 UTC (permalink / raw)
  To: linux-riscv
  Cc: conor, Conor Dooley, Randy Dunlap, Geert Uytterhoeven,
	Magnus Damm, Lad Prabhakar, linux-renesas-soc, linux-kernel

From: Conor Dooley <conor.dooley@microchip.com>

Randy reported yet another build issue with randconfigs on rv32:
WARNING: unmet direct dependencies detected for DMA_GLOBAL_POOL
  Depends on [n]: !ARCH_HAS_DMA_SET_UNCACHED [=n] && !DMA_DIRECT_REMAP [=y]
  Selected by [y]:
  - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_ALTERNATIVE [=y] && !RISCV_ISA_ZICBOM [=n] && RISCV_SBI [=y]

This happens when DMA_DIRECT_REMAP is selected by the T-Head CMO erratum
option and DMA_GLOBAL_POOL is selected by the Andes CMO erratum. Block
selecting the RZ/Five config option, and by extension DMA_GLOBAL_POOL,
if DMA_DIRECT_REMAP has already been enabled.

Fixes: 484861e09f3e ("soc: renesas: Kconfig: Select the required configs for RZ/Five SoC")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Closes: https://lore.kernel.org/all/24942b4d-d16a-463f-b39a-f9dfcb89d742@infradead.org/
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
I don't know what the exact fixes tag here is as I did not bisect with
the randconfig, so I blamed the one that added DMA_GLOBAL_POOL.

CC: Geert Uytterhoeven <geert+renesas@glider.be>
CC: Magnus Damm <magnus.damm@gmail.com>
CC: Conor Dooley <conor.dooley@microchip.com>
CC: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
CC: linux-renesas-soc@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 drivers/soc/renesas/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig
index 0071864c2111..0986672f6375 100644
--- a/drivers/soc/renesas/Kconfig
+++ b/drivers/soc/renesas/Kconfig
@@ -340,6 +340,7 @@ if RISCV
 config ARCH_R9A07G043
 	bool "RISC-V Platform support for RZ/Five"
 	depends on NONPORTABLE
+	depends on !DMA_DIRECT_REMAP
 	depends on RISCV_ALTERNATIVE
 	depends on !RISCV_ISA_ZICBOM
 	depends on RISCV_SBI
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] soc: renesas: make ARCH_R9A07G043 depend on !DMA_DIRECT_REMAP
  2023-12-11 22:06 [PATCH v1] soc: renesas: make ARCH_R9A07G043 depend on !DMA_DIRECT_REMAP Conor Dooley
@ 2023-12-12  8:19 ` Geert Uytterhoeven
  2023-12-12  8:43   ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2023-12-12  8:19 UTC (permalink / raw)
  To: Conor Dooley
  Cc: linux-riscv, Conor Dooley, Randy Dunlap, Magnus Damm,
	Lad Prabhakar, linux-renesas-soc, linux-kernel,
	Emil Renner Berthing

Hi Conor,

On Mon, Dec 11, 2023 at 11:06 PM Conor Dooley <conor@kernel.org> wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
>
> Randy reported yet another build issue with randconfigs on rv32:
> WARNING: unmet direct dependencies detected for DMA_GLOBAL_POOL
>   Depends on [n]: !ARCH_HAS_DMA_SET_UNCACHED [=n] && !DMA_DIRECT_REMAP [=y]
>   Selected by [y]:
>   - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_ALTERNATIVE [=y] && !RISCV_ISA_ZICBOM [=n] && RISCV_SBI [=y]
>
> This happens when DMA_DIRECT_REMAP is selected by the T-Head CMO erratum

or by the Zicbom extension support?

> option and DMA_GLOBAL_POOL is selected by the Andes CMO erratum. Block
> selecting the RZ/Five config option, and by extension DMA_GLOBAL_POOL,
> if DMA_DIRECT_REMAP has already been enabled.
>
> Fixes: 484861e09f3e ("soc: renesas: Kconfig: Select the required configs for RZ/Five SoC")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> Closes: https://lore.kernel.org/all/24942b4d-d16a-463f-b39a-f9dfcb89d742@infradead.org/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.8.

Or should this be queued as a fix for v6.7 instead?

> ---
> I don't know what the exact fixes tag here is as I did not bisect with
> the randconfig, so I blamed the one that added DMA_GLOBAL_POOL.

Bisection leads to commit da323d4640704001 ("dma-direct: add
dependencies to CONFIG_DMA_GLOBAL_POOL") in v6.7-rc1, but that is
merely making visible the symptoms, so I think your Fixes tag is fine.

Esmil: I think you need a similar fix for ERRATA_STARFIVE_JH7100 in
your tree.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] soc: renesas: make ARCH_R9A07G043 depend on !DMA_DIRECT_REMAP
  2023-12-12  8:19 ` Geert Uytterhoeven
@ 2023-12-12  8:43   ` Conor Dooley
  2023-12-13 16:18     ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2023-12-12  8:43 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Conor Dooley, linux-riscv, Randy Dunlap, Magnus Damm,
	Lad Prabhakar, linux-renesas-soc, linux-kernel,
	Emil Renner Berthing

[-- Attachment #1: Type: text/plain, Size: 2197 bytes --]

On Tue, Dec 12, 2023 at 09:19:32AM +0100, Geert Uytterhoeven wrote:
> Hi Conor,
> 
> On Mon, Dec 11, 2023 at 11:06 PM Conor Dooley <conor@kernel.org> wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> >
> > Randy reported yet another build issue with randconfigs on rv32:
> > WARNING: unmet direct dependencies detected for DMA_GLOBAL_POOL
> >   Depends on [n]: !ARCH_HAS_DMA_SET_UNCACHED [=n] && !DMA_DIRECT_REMAP [=y]
> >   Selected by [y]:
> >   - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_ALTERNATIVE [=y] && !RISCV_ISA_ZICBOM [=n] && RISCV_SBI [=y]
> >
> > This happens when DMA_DIRECT_REMAP is selected by the T-Head CMO erratum
> 
> or by the Zicbom extension support?

Probably, yeah. That was just the conditions for this particular
randconfig IIRC.

> > option and DMA_GLOBAL_POOL is selected by the Andes CMO erratum. Block
> > selecting the RZ/Five config option, and by extension DMA_GLOBAL_POOL,
> > if DMA_DIRECT_REMAP has already been enabled.
> >
> > Fixes: 484861e09f3e ("soc: renesas: Kconfig: Select the required configs for RZ/Five SoC")
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> > Closes: https://lore.kernel.org/all/24942b4d-d16a-463f-b39a-f9dfcb89d742@infradead.org/
> > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-devel for v6.8.
> 
> Or should this be queued as a fix for v6.7 instead?

Depends on your opinion on how critical such a fix is I suppose.

> > ---
> > I don't know what the exact fixes tag here is as I did not bisect with
> > the randconfig, so I blamed the one that added DMA_GLOBAL_POOL.
> 
> Bisection leads to commit da323d4640704001 ("dma-direct: add
> dependencies to CONFIG_DMA_GLOBAL_POOL") in v6.7-rc1, but that is
> merely making visible the symptoms, so I think your Fixes tag is fine.
> 
> Esmil: I think you need a similar fix for ERRATA_STARFIVE_JH7100 in
> your tree.

I probably need a similar fix in my tree for that, since I applied
Emil's patches...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] soc: renesas: make ARCH_R9A07G043 depend on !DMA_DIRECT_REMAP
  2023-12-12  8:43   ` Conor Dooley
@ 2023-12-13 16:18     ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2023-12-13 16:18 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Conor Dooley, linux-riscv, Randy Dunlap, Magnus Damm,
	Lad Prabhakar, linux-renesas-soc, linux-kernel,
	Emil Renner Berthing

On Tue, Dec 12, 2023 at 9:43 AM Conor Dooley <conor.dooley@microchip.com> wrote:
> On Tue, Dec 12, 2023 at 09:19:32AM +0100, Geert Uytterhoeven wrote:
> > On Mon, Dec 11, 2023 at 11:06 PM Conor Dooley <conor@kernel.org> wrote:
> > > From: Conor Dooley <conor.dooley@microchip.com>
> > >
> > > Randy reported yet another build issue with randconfigs on rv32:
> > > WARNING: unmet direct dependencies detected for DMA_GLOBAL_POOL
> > >   Depends on [n]: !ARCH_HAS_DMA_SET_UNCACHED [=n] && !DMA_DIRECT_REMAP [=y]
> > >   Selected by [y]:
> > >   - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_ALTERNATIVE [=y] && !RISCV_ISA_ZICBOM [=n] && RISCV_SBI [=y]
> > >
> > > This happens when DMA_DIRECT_REMAP is selected by the T-Head CMO erratum
> >
> > or by the Zicbom extension support?
>
> Probably, yeah. That was just the conditions for this particular
> randconfig IIRC.
>
> > > option and DMA_GLOBAL_POOL is selected by the Andes CMO erratum. Block
> > > selecting the RZ/Five config option, and by extension DMA_GLOBAL_POOL,
> > > if DMA_DIRECT_REMAP has already been enabled.
> > >
> > > Fixes: 484861e09f3e ("soc: renesas: Kconfig: Select the required configs for RZ/Five SoC")
> > > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > > Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> > > Closes: https://lore.kernel.org/all/24942b4d-d16a-463f-b39a-f9dfcb89d742@infradead.org/
> > > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> >
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > i.e. will queue in renesas-devel for v6.8.
> >
> > Or should this be queued as a fix for v6.7 instead?
>
> Depends on your opinion on how critical such a fix is I suppose.
>
> > > ---
> > > I don't know what the exact fixes tag here is as I did not bisect with
> > > the randconfig, so I blamed the one that added DMA_GLOBAL_POOL.
> >
> > Bisection leads to commit da323d4640704001 ("dma-direct: add
> > dependencies to CONFIG_DMA_GLOBAL_POOL") in v6.7-rc1, but that is
> > merely making visible the symptoms, so I think your Fixes tag is fine.

Actually this change cannot be applied (by hand) to the commit in
the Fixes tag, as at that time RISCV_DMA_NONCOHERENT still selected
DMA_DIRECT_REMAP, thus causing a recursive dependency :-(
So I'm gonna drop the Fixes tag, and just queue it for v6.8.  After all
it's "just a randconfig failure", and I don't want anyone to encourage
backporting any of this NONPORTABLE mess to older stable kernels...

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-13 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-11 22:06 [PATCH v1] soc: renesas: make ARCH_R9A07G043 depend on !DMA_DIRECT_REMAP Conor Dooley
2023-12-12  8:19 ` Geert Uytterhoeven
2023-12-12  8:43   ` Conor Dooley
2023-12-13 16:18     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).