From 8f25b7eb60d49dca3cea129cd491b874202344ac Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Fri, 21 Aug 2026 13:16:21 +0200 Subject: [PATCH] arch/x86_64: scope user address helper to addrenv x86_64_uservaddr() depends on the address-environment layout and is only consumed by the kernel address-environment path. Guard it with CONFIG_ARCH_ADDRENV so MM_PGALLOC can also be enabled in flat builds. Signed-off-by: raiden00pl Assisted-by: OpenAI Codex:gpt-5 --- arch/x86_64/src/common/pgalloc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86_64/src/common/pgalloc.h b/arch/x86_64/src/common/pgalloc.h index 0e7cbe043b9..3d95e2df368 100644 --- a/arch/x86_64/src/common/pgalloc.h +++ b/arch/x86_64/src/common/pgalloc.h @@ -104,6 +104,7 @@ static inline uintptr_t x86_64_pgpaddr(uintptr_t vaddr) * ****************************************************************************/ +#ifdef CONFIG_ARCH_ADDRENV static inline bool x86_64_uservaddr(uintptr_t vaddr) { /* Check if this address is within the range of the virtualized .bss/.data, @@ -116,6 +117,7 @@ static inline bool x86_64_uservaddr(uintptr_t vaddr) #endif ); } +#endif /**************************************************************************** * Name: x86_64_pgwipe