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 <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5
This commit is contained in:
raiden00pl 2026-08-21 13:16:21 +02:00 committed by GUIDINGLI
parent 0e04c16887
commit 8f25b7eb60

View file

@ -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