This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch releases/10.0 in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 737ca80207700a973c5d693b25df20057fcb7740 Author: Masayuki Ishikawa <masayuki.ishik...@gmail.com> AuthorDate: Wed Nov 25 06:58:49 2020 +0900 Revert "arch: k210: Fix the pause handler for SMP" This reverts commit a500bd0238e0db994642ed7487de3e9e4b17dd3d. --- arch/risc-v/src/k210/k210_cpupause.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/risc-v/src/k210/k210_cpupause.c b/arch/risc-v/src/k210/k210_cpupause.c index 2eaa573..88af783 100644 --- a/arch/risc-v/src/k210/k210_cpupause.c +++ b/arch/risc-v/src/k210/k210_cpupause.c @@ -205,7 +205,6 @@ int up_cpu_paused(int cpu) int riscv_pause_handler(int irq, void *c, FAR void *arg) { int cpu = up_cpu_index(); - int ret = OK; /* Clear machine software interrupt */ @@ -218,21 +217,10 @@ int riscv_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; } /****************************************************************************