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; }