You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2024/07/09 11:36:55 UTC
(nuttx) 02/02: arch/arm64: allow to use custom idle
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 848eca04ca7b8a7bd16cae26275770cf6bfb1b5e
Author: xuxingliang <xu...@xiaomi.com>
AuthorDate: Mon Jul 8 20:56:25 2024 +0800
arch/arm64: allow to use custom idle
Signed-off-by: xuxingliang <xu...@xiaomi.com>
---
arch/arm64/src/common/CMakeLists.txt | 7 +++++--
arch/arm64/src/common/Make.defs | 6 +++++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/src/common/CMakeLists.txt b/arch/arm64/src/common/CMakeLists.txt
index 0746b9994c..339a915007 100644
--- a/arch/arm64/src/common/CMakeLists.txt
+++ b/arch/arm64/src/common/CMakeLists.txt
@@ -31,8 +31,7 @@ endif()
# Common C source files ( OS call up_xxx)
list(APPEND SRCS arm64_initialize.c arm64_initialstate.c arm64_boot.c)
-list(APPEND SRCS arm64_nputs.c arm64_idle.c arm64_copystate.c
- arm64_createstack.c)
+list(APPEND SRCS arm64_nputs.c arm64_copystate.c arm64_createstack.c)
list(APPEND SRCS arm64_releasestack.c arm64_stackframe.c arm64_usestack.c)
list(APPEND SRCS arm64_exit.c arm64_fork.c arm64_switchcontext.c)
list(APPEND SRCS arm64_schedulesigaction.c arm64_sigdeliver.c)
@@ -47,6 +46,10 @@ list(APPEND SRCS arm64_syscall.c)
# Use common heap allocation for now (may need to be customized later)
list(APPEND SRCS arm64_allocateheap.c)
+if(NOT CONFIG_ARCH_IDLE_CUSTOM)
+ list(APPEND SRCS arm64_idle.c)
+endif()
+
if(CONFIG_ARM64_GIC_VERSION EQUAL 3)
list(APPEND SRCS arm64_gicv3.c)
endif()
diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs
index d29014861e..316514de78 100644
--- a/arch/arm64/src/common/Make.defs
+++ b/arch/arm64/src/common/Make.defs
@@ -43,7 +43,7 @@ endif
# Common C source files ( OS call up_xxx)
CMN_CSRCS = arm64_initialize.c arm64_initialstate.c arm64_boot.c
-CMN_CSRCS += arm64_nputs.c arm64_idle.c arm64_copystate.c arm64_createstack.c
+CMN_CSRCS += arm64_nputs.c arm64_copystate.c arm64_createstack.c
CMN_CSRCS += arm64_releasestack.c arm64_stackframe.c arm64_usestack.c
CMN_CSRCS += arm64_exit.c arm64_fork.c arm64_switchcontext.c
CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c
@@ -59,6 +59,10 @@ CMN_CSRCS += arm64_modifyreg8.c arm64_modifyreg16.c arm64_modifyreg32.c
# Use common heap allocation for now (may need to be customized later)
CMN_CSRCS += arm64_allocateheap.c
+ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+ CMN_CSRCS += arm64_idle.c
+endif
+
ifeq ($(CONFIG_ARM64_GIC_VERSION),3)
CMN_CSRCS += arm64_gicv3.c
endif