arch: risc-v: Fix up_interrupt_context() for SMP
Summary: - Apply the same fix for Arm SMP Impact: - Affects SMP only Testing: - Tested with maix-bit:smp (qemu) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
bbc6571b28
commit
e8ec8fb4b4
@ -67,7 +67,17 @@
|
||||
bool up_interrupt_context(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_RV64GC
|
||||
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;
|
||||
#else
|
||||
return g_current_regs != NULL;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user