arch: xtensa: Fix up_interrupt_context() for SMP

Summary:
- Apply the same fix for Arm SMP

Impact:
- Affects SMP only

Testing:
- Tested with esp32-core:smp (qemu)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2020-09-29 08:28:34 +09:00 committed by patacongo
parent e8ec8fb4b4
commit 68f102055a

View File

@ -59,5 +59,15 @@
bool up_interrupt_context(void)
{
return CURRENT_REGS != NULL;
#ifdef CONFIG_SMP
irqstate_t flags = up_irq_save();
#endif
bool ret = CURRENT_REGS != NULL;
#ifdef CONFIG_SMP
up_irq_restore(flags);
#endif
return ret;
}