arch/x86: (Intel64) do not lock interrupts around irq_offload()

This is the Wrong Thing(tm) with SMP enabled. Previously this
worked because interrupts would be re-enabled in the interrupt
entry sequence, but this is no longer the case.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
Charles E. Youse 2019-09-30 13:41:44 -04:00 committed by Anas Nashif
commit 3b145c0d4b

View file

@ -92,15 +92,11 @@ int z_arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
void z_arch_irq_offload(irq_offload_routine_t routine, void *parameter)
{
u32_t key;
key = irq_lock();
x86_irq_funcs[CONFIG_IRQ_OFFLOAD_VECTOR - IV_IRQS] = routine;
x86_irq_args[CONFIG_IRQ_OFFLOAD_VECTOR - IV_IRQS] = parameter;
__asm__ volatile("int %0" : : "i" (CONFIG_IRQ_OFFLOAD_VECTOR)
: "memory");
x86_irq_funcs[CONFIG_IRQ_OFFLOAD_VECTOR - IV_IRQS] = NULL;
irq_unlock(key);
}
#endif /* CONFIG_IRQ_OFFLOAD */