From 4cdc5edb4e0be5b58c6b05036a06aedc122a2510 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 9 Jul 2020 17:15:54 +0200 Subject: [PATCH] Revert "freertos, soc: don't lower INTLEVEL when entering critical sections" This reverts commit 614a580bbb5a13f96595ae9ff792ecfd36d42150. --- components/freertos/xtensa/include/freertos/portmacro.h | 2 +- components/soc/include/soc/spinlock.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/freertos/xtensa/include/freertos/portmacro.h b/components/freertos/xtensa/include/freertos/portmacro.h index 6b824e4199..979ffecab9 100644 --- a/components/freertos/xtensa/include/freertos/portmacro.h +++ b/components/freertos/xtensa/include/freertos/portmacro.h @@ -144,7 +144,7 @@ static inline uint32_t xPortGetCoreID(void); // They can be called from interrupts too. // WARNING: Only applies to current CPU. See notes above. static inline unsigned portENTER_CRITICAL_NESTED(void) { - unsigned state = XTOS_SET_MIN_INTLEVEL(XCHAL_EXCM_LEVEL); + unsigned state = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); portbenchmarkINTERRUPT_DISABLE(); return state; } diff --git a/components/soc/include/soc/spinlock.h b/components/soc/include/soc/spinlock.h index 547fe62406..fd6ec4e339 100644 --- a/components/soc/include/soc/spinlock.h +++ b/components/soc/include/soc/spinlock.h @@ -67,7 +67,7 @@ static inline bool __attribute__((always_inline)) spinlock_acquire(spinlock_t *l uint32_t core_id, other_core_id; assert(lock); - irq_status = XTOS_SET_MIN_INTLEVEL(XCHAL_EXCM_LEVEL); + irq_status = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); if(timeout != SPINLOCK_WAIT_FOREVER){ RSR(CCOUNT, ccount_start); @@ -139,7 +139,7 @@ static inline void __attribute__((always_inline)) spinlock_release(spinlock_t *l uint32_t core_id; assert(lock); - irq_status = XTOS_SET_MIN_INTLEVEL(XCHAL_EXCM_LEVEL); + irq_status = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); RSR(PRID, core_id); assert(core_id == lock->owner); // This is a mutex we didn't lock, or it's corrupt