You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2021/07/04 01:16:18 UTC

[incubator-nuttx] branch master updated: arch/sim: Fix bt and audio simulation stop work in SMP mode

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a18b807  arch/sim: Fix bt and audio simulation stop work in SMP mode
a18b807 is described below

commit a18b807fa93dd8561a752d52d4d3fa3ed2c660b5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jul 4 03:32:06 2021 +0800

    arch/sim: Fix bt and audio simulation stop work in SMP mode
    
    by removing the SMP up_idle and sim_timer_handler
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/up_idle.c      | 28 ----------------------------
 arch/sim/src/sim/up_internal.h  |  1 -
 arch/sim/src/sim/up_smpsignal.c |  8 --------
 3 files changed, 37 deletions(-)

diff --git a/arch/sim/src/sim/up_idle.c b/arch/sim/src/sim/up_idle.c
index 7b52b34..6de19e9 100644
--- a/arch/sim/src/sim/up_idle.c
+++ b/arch/sim/src/sim/up_idle.c
@@ -54,7 +54,6 @@
  *
  ****************************************************************************/
 
-#ifndef CONFIG_SMP
 void up_idle(void)
 {
 #ifdef CONFIG_PM
@@ -115,30 +114,3 @@ void up_idle(void)
   sim_foc_update();
 #endif
 }
-#endif /* !CONFIG_SMP */
-
-#ifdef CONFIG_SMP
-void up_idle(void)
-{
-  host_sleep(100 * 1000);
-}
-#endif
-
-/****************************************************************************
- * Name: sim_timer_handler
- ****************************************************************************/
-
-#ifdef CONFIG_SMP
-void sim_timer_handler(void)
-{
-  /* Handle UART data availability */
-
-  up_uartloop();
-
-#ifdef CONFIG_ONESHOT
-  /* Driver the simulated interval timer */
-
-  up_timer_update();
-#endif
-}
-#endif /* CONFIG_SMP */
diff --git a/arch/sim/src/sim/up_internal.h b/arch/sim/src/sim/up_internal.h
index d83e80d..43dbede 100644
--- a/arch/sim/src/sim/up_internal.h
+++ b/arch/sim/src/sim/up_internal.h
@@ -174,7 +174,6 @@ int up_cpu_paused(int cpu);
 struct tcb_s *up_this_task(void);
 int up_cpu_set_pause_handler(int irq);
 void sim_send_ipi(int cpu);
-void sim_timer_handler(void);
 #endif
 
 /* up_oneshot.c *************************************************************/
diff --git a/arch/sim/src/sim/up_smpsignal.c b/arch/sim/src/sim/up_smpsignal.c
index 8d147b0..cad6cca 100644
--- a/arch/sim/src/sim/up_smpsignal.c
+++ b/arch/sim/src/sim/up_smpsignal.c
@@ -98,14 +98,6 @@ static int sim_cpupause_handler(int irq, FAR void *context, FAR void *arg)
 
       leave_critical_section(flags);
     }
-  else
-    {
-      /* NOTE: sim specific logic
-       * In the case of no pause request, call sim_timer_handler()
-       */
-
-      sim_timer_handler();
-    }
 
   return OK;
 }