diff --git a/arch/xtensa/src/esp32/esp32_cpuint.c b/arch/xtensa/src/esp32/esp32_cpuint.c index b7c941c726..515ac471e4 100644 --- a/arch/xtensa/src/esp32/esp32_cpuint.c +++ b/arch/xtensa/src/esp32/esp32_cpuint.c @@ -399,18 +399,11 @@ int esp32_cpuint_initialize(void) void up_disable_irq(int cpuint) { -#ifdef CONFIG_SMP - int cpu; -#endif + int cpu = up_cpu_index(); DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX); -#ifdef CONFIG_SMP - cpu = up_cpu_index(); xtensa_disable_cpuint(&g_intenable[cpu], (1ul << cpuint)); -#else - xtensa_disable_cpuint(&g_intenable[0], (1ul << cpuint)); -#endif } /**************************************************************************** @@ -423,18 +416,11 @@ void up_disable_irq(int cpuint) void up_enable_irq(int cpuint) { -#ifdef CONFIG_SMP - int cpu; -#endif + int cpu = up_cpu_index(); DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX); -#ifdef CONFIG_SMP - cpu = up_cpu_index(); xtensa_enable_cpuint(&g_intenable[cpu], (1ul << cpuint)); -#else - xtensa_enable_cpuint(&g_intenable[0], (1ul << cpuint)); -#endif } /****************************************************************************