This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f25b7eb60d arch/x86_64: scope user address helper to addrenv
8f25b7eb60d is described below

commit 8f25b7eb60d49dca3cea129cd491b874202344ac
Author: raiden00pl <[email protected]>
AuthorDate: Fri Aug 21 13:16:21 2026 +0200

    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 <[email protected]>
    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

Reply via email to