This is an automated email from the ASF dual-hosted git repository.
acassis 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 9b255e19912 arch/arm64: Fix the kernel build link with
CONFIG_DEV_SIMPLE_ADDRENV.
9b255e19912 is described below
commit 9b255e199127cd395e00f10a8a496c4a9c652fd9
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Oct 26 17:08:28 2026 +0100
arch/arm64: Fix the kernel build link with CONFIG_DEV_SIMPLE_ADDRENV.
Commit dbc9a233f14 ("arch: translate an address with the MMU in a
kernel build") makes a kernel build with CONFIG_DEV_SIMPLE_ADDRENV
compile arm64_physpgaddr.c, and drivers/misc/addrenv.c no longer
defines up_addrenv_va_to_pa() in a kernel build. But all the code of
arm64_physpgaddr.c was still inside #ifndef CONFIG_DEV_SIMPLE_ADDRENV,
so no file defined up_addrenv_va_to_pa() and the link failed, for
example for virtio_9p.c.
Keep only up_addrenv_pa_to_va() under that condition, because
drivers/misc/addrenv.c still defines it. Make.defs and CMakeLists.txt
already select the file when it must define up_addrenv_va_to_pa().
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <[email protected]>
---
arch/arm64/src/common/arm64_physpgaddr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/src/common/arm64_physpgaddr.c
b/arch/arm64/src/common/arm64_physpgaddr.c
index 15d017e3f73..0b1460e4b53 100644
--- a/arch/arm64/src/common/arm64_physpgaddr.c
+++ b/arch/arm64/src/common/arm64_physpgaddr.c
@@ -39,8 +39,6 @@
# include "pgalloc.h"
#endif
-#ifndef CONFIG_DEV_SIMPLE_ADDRENV
-
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -103,6 +101,10 @@ uintptr_t up_addrenv_va_to_pa(void *va)
((uintptr_t)va & VA_PAGE_OFFSET_MASK));
}
+/* With DEV_SIMPLE_ADDRENV, drivers/misc/addrenv.c defines this one. */
+
+#ifndef CONFIG_DEV_SIMPLE_ADDRENV
+
/****************************************************************************
* Name: up_addrenv_pa_to_va
*