soc: renesas: select ERRATA_ANDES for R9A07G043 only when alternatives are present
Subsystems (2)
PATCH 1/1 soc: renesas: select ERRATA_ANDES for R9A07G043 only when alternatives are present
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.
---
CC: Geert Uytterhoeven <[email protected]>
CC: Magnus Damm <[email protected]>
CC: Paul Walmsley <[email protected]>
CC: Palmer Dabbelt <[email protected]>
CC: Albert Ou <[email protected]>
CC: Lad Prabhakar <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/soc/renesas/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/renesas/Kconfig +1 -1
@@ -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) select ERRATA_ANDES_CMO if ERRATA_ANDES help This enables support for the Renesas RZ/Five SoC.
Signature · 1 line
2.40.1
Hi Conor,
Quoted 13 lines · Conor Dooley
Randy reported a randconfig build issue against linux-next:
WARNING: unmet direct dependencies detected forERRATA_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: 'structalt_entry' declared inside parameter list will not be visible outside of this definition or declaration
59 | void__init_or_moduleandes_errata_patch_func(structalt_entry*begin, structalt_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_ANDESconfig option.
Quoted 5 lines
Reported-by Randy Dunlap <[email protected]>Acked-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>Signed-off-by Conor Dooley <[email protected]>
Thanks for your patch!
drivers/soc/renesas/Kconfig config ARCH_R9A07G043 · line 346
Quoted 8 lines
drivers/soc/renesas/Kconfig +1
-1@@ -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)).
drivers/soc/renesas/Kconfig config ARCH_R9A07G043 · line 347
Quoted 1 line
drivers/soc/renesas/Kconfig +0
-0select 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?
drivers/soc/renesas/Kconfig config ARCH_R9A07G043 · line 349
Quoted 2 lines
drivers/soc/renesas/Kconfig +0
-0help This enables support for the Renesas RZ/Five SoC.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Quoted 38 lines · Geert Uytterhoeven
Hi Conor,
Quoted 13 lines · Conor Dooley
Randy reported a randconfig build issue against linux-next:
WARNING: unmet direct dependencies detected forERRATA_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: 'structalt_entry' declared inside parameter list will not be visible outside of this definition or declaration
59 | void__init_or_moduleandes_errata_patch_func(structalt_entry*begin, structalt_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_ANDESconfig option.Quoted 5 lines
Reported-by Randy Dunlap <[email protected]>Acked-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>Signed-off-by Conor Dooley <[email protected]>Thanks for your patch!
drivers/soc/renesas/Kconfig config ARCH_R9A07G043 · line 346
Quoted 8 lines
drivers/soc/renesas/Kconfig +1
-1@@ -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_R9A07G043should depend onRISCV_ALTERNATIVE(andRISCV_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)).
Quoted 6 lines
drivers/soc/renesas/Kconfig config ARCH_R9A07G043 · line 347
Quoted 1 line
drivers/soc/renesas/Kconfig +0
-0select ERRATA_ANDES_CMO if ERRATA_ANDESAnd then this "if" can go as well.
Any other hard dependencies?
E.g. can RZ/Five work withoutRISCV_DMA_NONCOHERENT?
That seems fair to me, it won't work without any of the above, so it's probably fair game to make them actual dependencies & likely more user friendly since it'll prevent people creating a kernel that cannot function.
Cheers,
Conor.
Quoted 14 lines
drivers/soc/renesas/Kconfig config ARCH_R9A07G043 · line 349
Quoted 3 lines
drivers/soc/renesas/Kconfig +0
-0help This enables support for the Renesas RZ/Five SoC.Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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