soc.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] soc: renesas: make ARCH_R9A07G043 depend on required options
       [not found] <20231012-pouch-parkway-7d26c04b3300@spud>
@ 2023-10-12 12:15 ` Geert Uytterhoeven
  2023-10-12 12:55   ` Conor Dooley
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-10-12 12:15 UTC (permalink / raw)
  To: Conor Dooley
  Cc: linux-renesas-soc, Conor Dooley, Randy Dunlap, Magnus Damm,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Lad Prabhakar,
	linux-kernel, linux-riscv, soc

Hi Conor,

On Thu, Oct 12, 2023 at 1:11 PM Conor Dooley <conor@kernel.org> wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
>
> Randy reported a randconfig build issue against linux-next:
> WARNING: unmet direct dependencies detected for ERRATA_ANDES
>   Depends on [n]: RISCV_ALTERNATIVE [=n] && RISCV_SBI [=y]
>   Selected by [y]:
>   - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_SBI [=y]
>
> ../arch/riscv/errata/andes/errata.c:59:54: warning: 'struct alt_entry' declared inside parameter list will not be visible outside of this definition or declaration
>    59 | void __init_or_module andes_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
>
> On RISC-V, alternatives are not usable in XIP kernels, which this
> randconfig happened to select. Rather than add a check for whether
> alternatives are available before selecting the ERRATA_ANDES config
> option, rework the R9A07G043 Kconfig entry to depend on the
> configuration options required to support its non-standard cache
> coherency implementation.
>
> Without these options enabled, the SoC is effectively non-functional to
> begin with, so there's an extra benefit in preventing the creation of
> non-functional kernels.
>
> The "if RISCV_DMA_NONCOHERENT" can be dropped, as ERRATA_ANDES_CMO will
> select it.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Closes: https://lore.kernel.org/all/09a6b0f0-76a1-45e3-ab52-329c47393d1d@infradead.org/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>
> I dropped Randy's t-b etc since this patch is quite different.
>
> v2: drop the extra condition on the select of ERRATA_ANDES, move instead
> to depending on required options.

Thanks for the update!

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

> --- a/drivers/soc/renesas/Kconfig
> +++ b/drivers/soc/renesas/Kconfig
> @@ -340,10 +340,12 @@ if RISCV
>  config ARCH_R9A07G043
>         bool "RISC-V Platform support for RZ/Five"
>         depends on NONPORTABLE
> +       depends on RISCV_ALTERNATIVE
> +       depends on RISCV_SBI
>         select ARCH_RZG2L
> -       select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT
> +       select AX45MP_L2_CACHE
>         select DMA_GLOBAL_POOL
> -       select ERRATA_ANDES if RISCV_SBI
> +       select ERRATA_ANDES
>         select ERRATA_ANDES_CMO if ERRATA_ANDES

As ERRATA_ANDES is now selected unconditionally, the test
for it can be removed.  I can do that while applying.

>         help
>           This enables support for the Renesas RZ/Five SoC.

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] 2+ messages in thread

* Re: [PATCH v2] soc: renesas: make ARCH_R9A07G043 depend on required options
  2023-10-12 12:15 ` [PATCH v2] soc: renesas: make ARCH_R9A07G043 depend on required options Geert Uytterhoeven
@ 2023-10-12 12:55   ` Conor Dooley
  0 siblings, 0 replies; 2+ messages in thread
From: Conor Dooley @ 2023-10-12 12:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-renesas-soc, Conor Dooley, Randy Dunlap, Magnus Damm,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Lad Prabhakar,
	linux-kernel, linux-riscv, soc

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

On Thu, Oct 12, 2023 at 02:15:21PM +0200, Geert Uytterhoeven wrote:

> > --- a/drivers/soc/renesas/Kconfig
> > +++ b/drivers/soc/renesas/Kconfig
> > @@ -340,10 +340,12 @@ if RISCV
> >  config ARCH_R9A07G043
> >         bool "RISC-V Platform support for RZ/Five"
> >         depends on NONPORTABLE
> > +       depends on RISCV_ALTERNATIVE
> > +       depends on RISCV_SBI
> >         select ARCH_RZG2L
> > -       select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT
> > +       select AX45MP_L2_CACHE
> >         select DMA_GLOBAL_POOL
> > -       select ERRATA_ANDES if RISCV_SBI
> > +       select ERRATA_ANDES
> >         select ERRATA_ANDES_CMO if ERRATA_ANDES
> 
> As ERRATA_ANDES is now selected unconditionally, the test
> for it can be removed.  I can do that while applying.

Yeah, I wasn't really sure whether to delete it or not. I shoulda
mentioned it under the snip line I suppose. I had it in my head that
keeping the if there made things less likely to fail if changes were
made to the Kconfig stuff in arch/riscv, but this is pretty coupled
and would likely blow up anyway.

Go for it.

Cheers,
Conor.

> 
> >         help
> >           This enables support for the Renesas RZ/Five SoC.


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

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

end of thread, other threads:[~2023-10-12 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20231012-pouch-parkway-7d26c04b3300@spud>
2023-10-12 12:15 ` [PATCH v2] soc: renesas: make ARCH_R9A07G043 depend on required options Geert Uytterhoeven
2023-10-12 12:55   ` Conor Dooley

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).