On Wed, Dec 31, 2025 at 08:10:54PM +0100, Heinrich Schuchardt wrote:

> We have opted to prefer 'if' over '#if' to more easily see problems in
> contributed code.
> 
> When compiling with CONFIG_CC_OPTIMIZE_FOR_DEBUG=y the compiler does not
> execute all optimization paths and references live-tree functions
> even if CONFIG_$(PHASE_)OF_LIVE is not defined.
> 
> E.g. building qemu-riscv64_smode_defconfig with
> CONFIG_CC_OPTIMIZE_FOR_DEBUG=y fails due to missing symbols.
> 
> Provide dummy implementation to allow debug builds.
> 
> Signed-off-by: Heinrich Schuchardt <[email protected]>

I think we need to look harder at re-factoring drivers/core/ofnode.c to
move the live portions elsewhere. It's 175 platforms out of 1489 using
it today so we can probably do better. The very first thing I stumbled
on is that OF_TRANSLATE might have incorrect deps? A quick glance at
of_translate_dma_address / of_translate_address says to me it should all
be optimized out in the not-OF_LIVE case.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to