Re: [PATCH] x86/mm: Unify __phys_addr_symbol()

From: Dave Hansen
Date: Fri Oct 24 2025 - 13:08:14 EST


On 8/13/25 08:08, Brendan Jackman wrote:
> There are two implementations on 64-bit, depending on
> CONFIG_DEBUG_VIRTUAL, but they differ only regarding the presence of
> VIRTUAL_BUG_ON, which is already ifdef'd on CONFIG_DEBUG_VIRTUAL.
>
> To avoid adding a function call on non-LTO non-DEBUG_VIRTUAL builds,
> move the function into the header. (Note the function is already only
> used on 64-bit).

... and just for the record CONFIG_DEBUG_VIRTUAL really is a
debug-build-only thing. I don't see it set in any normal distro kernels.
This shouldn't bloat any normal builds, although it will probably make
CONFIG_DEBUG_VIRTUAL=y build bigger. But I don't think we care about that.

Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>