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

commit 05e666eafb653d6ebbef9558460ad4d967453c67
Author: hujun5 <[email protected]>
AuthorDate: Fri Nov 28 21:03:46 2025 +0800

    arch/arm64: support smp call in BMP
    
    support smp call in BMP
    
    Signed-off-by: hujun5 <[email protected]>
---
 arch/arm64/src/common/CMakeLists.txt  | 2 +-
 arch/arm64/src/common/Make.defs       | 2 +-
 arch/arm64/src/common/arm64_gicv3.c   | 2 ++
 arch/arm64/src/common/arm64_smpcall.c | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/src/common/CMakeLists.txt 
b/arch/arm64/src/common/CMakeLists.txt
index e2068ca5c79..cb7f7733c81 100644
--- a/arch/arm64/src/common/CMakeLists.txt
+++ b/arch/arm64/src/common/CMakeLists.txt
@@ -104,7 +104,7 @@ if(NOT CONFIG_UP)
   list(APPEND SRCS arm64_cpustart.c)
 endif()
 
-if(CONFIG_SMP)
+if(NOT CONFIG_UP)
   list(APPEND SRCS arm64_smpcall.c)
 endif()
 
diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs
index 1b605338e40..451492cc987 100644
--- a/arch/arm64/src/common/Make.defs
+++ b/arch/arm64/src/common/Make.defs
@@ -118,7 +118,7 @@ ifneq ($(CONFIG_UP),y)
 CMN_CSRCS += arm64_cpustart.c
 endif
 
-ifeq ($(CONFIG_SMP),y)
+ifneq ($(CONFIG_UP),y)
 CMN_CSRCS += arm64_smpcall.c
 endif
 
diff --git a/arch/arm64/src/common/arm64_gicv3.c 
b/arch/arm64/src/common/arm64_gicv3.c
index f6a2279034c..78528e69eaa 100644
--- a/arch/arm64/src/common/arm64_gicv3.c
+++ b/arch/arm64/src/common/arm64_gicv3.c
@@ -1063,6 +1063,8 @@ static void arm64_gic_init(void)
 
 #ifdef CONFIG_SMP
   up_enable_irq(GIC_SMP_SCHED);
+#endif
+#ifndef CONFIG_UP
   up_enable_irq(GIC_SMP_CALL);
 #endif
 }
diff --git a/arch/arm64/src/common/arm64_smpcall.c 
b/arch/arm64/src/common/arm64_smpcall.c
index fdd6fe0a727..4c2e242ca32 100644
--- a/arch/arm64/src/common/arm64_smpcall.c
+++ b/arch/arm64/src/common/arm64_smpcall.c
@@ -67,11 +67,13 @@
  *
  ****************************************************************************/
 
+#ifdef CONFIG_SMP
 int arm64_smp_sched_handler(int irq, void *context, void *arg)
 {
   nxsched_process_delivered(this_cpu());
   return OK;
 }
+#endif
 
 /****************************************************************************
  * Name: up_send_smp_sched

Reply via email to