From c9b15ebb6a7d0f391b9130e436d64ffe6e441673 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 25 Dec 2016 09:26:20 -0600 Subject: [PATCH] Xtensa ESP32: Remove call to sched_lock()/unock() from inter-cpu interrupt logic. Results in recursive call to sched_mergepending(). --- arch/xtensa/src/esp32/esp32_intercpu_interrupt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c b/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c index da7d70aaf9..01bac85b0c 100644 --- a/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c +++ b/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c @@ -41,7 +41,6 @@ #include #include -#include #include #include @@ -158,12 +157,6 @@ int xtensa_intercpu_interrupt(int tocpu, int intcode) DEBUGASSERT((unsigned)tocpu < CONFIG_SMP_NCPUS && (unsigned)intcode <= UINT8_MAX); - /* Disable context switching so that some other thread does not attempt to - * take the spinlock on the same CPU. - */ - - sched_lock(); - /* Make sure that each inter-cpu event is atomic. The spinlock should * only be locked if we just completed sending an interrupt to this * CPU but the other CPU has not yet processed it. @@ -195,7 +188,6 @@ int xtensa_intercpu_interrupt(int tocpu, int intcode) putreg32(DPORT_CPU_INTR_FROM_CPU_1, DPORT_CPU_INTR_FROM_CPU_1_REG); } - sched_unlock(); return OK; }