Skip to content

Commit 1531309

Browse files
ConchuODgeertu
authored andcommitted
soc: renesas: Make ARCH_R9A07G043 depend on required options
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 <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Conor Dooley <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/20231012-pouch-parkway-7d26c04b3300@spud Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent c1ec4b4 commit 1531309

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/soc/renesas/Kconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,13 @@ if RISCV
334334
config ARCH_R9A07G043
335335
bool "RISC-V Platform support for RZ/Five"
336336
depends on NONPORTABLE
337+
depends on RISCV_ALTERNATIVE
338+
depends on RISCV_SBI
337339
select ARCH_RZG2L
338-
select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT
340+
select AX45MP_L2_CACHE
339341
select DMA_GLOBAL_POOL
340-
select ERRATA_ANDES if RISCV_SBI
341-
select ERRATA_ANDES_CMO if ERRATA_ANDES
342-
342+
select ERRATA_ANDES
343+
select ERRATA_ANDES_CMO
343344
help
344345
This enables support for the Renesas RZ/Five SoC.
345346

0 commit comments

Comments
 (0)