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 2020/11/24 21:59:04 UTC

[incubator-nuttx] 04/06: Revert "arch: lc823450: Fix the pause handler for SMP"

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

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

commit 1ebc9cb880dd7f97ebe67eb051ca6d8ae8b23722
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Wed Nov 25 06:58:49 2020 +0900

    Revert "arch: lc823450: Fix the pause handler for SMP"
    
    This reverts commit 42dea9edf903329d5a4cb285bcbf1fcd68b23637.
---
 arch/arm/src/lc823450/lc823450_cpupause.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/arch/arm/src/lc823450/lc823450_cpupause.c b/arch/arm/src/lc823450/lc823450_cpupause.c
index b172df1..2714fc3 100644
--- a/arch/arm/src/lc823450/lc823450_cpupause.c
+++ b/arch/arm/src/lc823450/lc823450_cpupause.c
@@ -190,7 +190,6 @@ int up_cpu_paused(int cpu)
 int lc823450_pause_handler(int irq, void *c, FAR void *arg)
 {
   int cpu = up_cpu_index();
-  int ret = OK;
 
   /* Clear : Pause IRQ */
 
@@ -212,21 +211,10 @@ int lc823450_pause_handler(int irq, void *c, FAR void *arg)
 
   if (spin_islocked(&g_cpu_paused[cpu]))
     {
-      /* NOTE: up_cpu_paused() needs to be executed in a critical section
-       * to ensure that this CPU holds g_cpu_irqlock. However, adding
-       * a critical section in up_cpu_paused() is not a good idea,
-       * because it is also called in enter_critical_section() to break
-       * a deadlock
-       */
-
-      irqstate_t flags = enter_critical_section();
-
-      ret = up_cpu_paused(cpu);
-
-      leave_critical_section(flags);
+      return up_cpu_paused(cpu);
     }
 
-  return ret;
+  return OK;
 }
 
 /****************************************************************************