Hi Conor, On Mon, Oct 9, 2023 at 10:12 AM Conor Dooley <conor.dooley@xxxxxxxxxxxxx> wrote: > 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. Add a check for whether alternatives are > available before selecting the ERRATA_ANDES config option. > > Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > Closes: https://lore.kernel.org/all/09a6b0f0-76a1-45e3-ab52-329c47393d1d@xxxxxxxxxxxxx/ > Signed-off-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx> Thanks for your patch! > --- a/drivers/soc/renesas/Kconfig > +++ b/drivers/soc/renesas/Kconfig > @@ -343,7 +343,7 @@ config ARCH_R9A07G043 > select ARCH_RZG2L > select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT > select DMA_GLOBAL_POOL > - select ERRATA_ANDES if RISCV_SBI > + select ERRATA_ANDES if (RISCV_SBI && RISCV_ALTERNATIVE) Perhaps ARCH_R9A07G043 should depend on RISCV_ALTERNATIVE (and RISCV_SBI) instead? It's not like RZ/Five is gonna work without the Andes errata handling present (unless all of them are related to cache handling, and we can run uncached; also see below)). > select ERRATA_ANDES_CMO if ERRATA_ANDES And then this "if" can go as well. Any other hard dependencies? E.g. can RZ/Five work without RISCV_DMA_NONCOHERENT? > 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@xxxxxxxxxxxxxx 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