soc: renesas: make ARCH_R9A07G043 depend on required options
Subsystems (2)
PATCH v2 1/1 soc: renesas: make ARCH_R9A07G043 depend on required options
From: Conor Dooley <[email protected]>
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.
---
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.
--- drivers/soc/renesas/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/soc/renesas/Kconfig +4 -2
@@ -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 help This enables support for the Renesas RZ/Five SoC.
Signature · 1 line
2.39.2
Hi Conor,
Quoted 28 lines · Conor Dooley
From: Conor Dooley <[email protected]>
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. Rather than add a check for whether alternatives are available before selecting the
ERRATA_ANDESconfig option, rework the R9A07G043Kconfigentry 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, asERRATA_ANDES_CMOwill select it.Reported-by Randy Dunlap <[email protected]>Signed-off-by Conor Dooley <[email protected]>
Quoted 6 lines
---
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!
i.e. will queue in renesas-fixes for v6.6.
Quoted 5 lines
drivers/soc/renesas/Kconfig +0
-0@@ -340,10 +340,12 @@ if RISCV config ARCH_R9A07G043 bool "RISC-V Platform support for RZ/Five"
drivers/soc/renesas/Kconfig if RISCV · line 349
Quoted 10 lines
drivers/soc/renesas/Kconfig +4
-2depends 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.
drivers/soc/renesas/Kconfig if RISCV · line 351
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 10 lines · Geert Uytterhoeven
Quoted 10 lines
drivers/soc/renesas/Kconfig +2
-1@@ -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
Quoted 8 lines
drivers/soc/renesas/Kconfig if RISCV · line 349
Quoted 5 lines
drivers/soc/renesas/Kconfig +2
-1+ select AX45MP_L2_CACHE select DMA_GLOBAL_POOL - select ERRATA_ANDES if RISCV_SBI + select ERRATA_ANDES select ERRATA_ANDES_CMO if ERRATA_ANDESAs
ERRATA_ANDESis 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.
Quoted 3 lines
Quoted 3 lines
drivers/soc/renesas/Kconfig +0
-0help This enables support for the Renesas RZ/Five SoC.