interrupts: Do not assert on IRQ enable status for ISR install on GIC

The current `z_isr_install` implementation asserts that the IRQ to
which the ISR will be installed must be disabled.

This commit disables that assertion for the ARM GIC because the SGI-
type IRQs can never be disabled as per the specifications and this
causes the assertion to fail for them.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2020-03-17 16:16:26 +09:00 committed by Ioannis Glaropoulos
commit b58cc459de

View file

@ -16,7 +16,14 @@ void z_isr_install(unsigned int irq, void (*routine)(void *), void *param)
{ {
unsigned int table_idx = irq - CONFIG_GEN_IRQ_START_VECTOR; unsigned int table_idx = irq - CONFIG_GEN_IRQ_START_VECTOR;
/*
* Do not assert on the IRQ enable status for ARM GIC since the SGI
* type interrupts are always enabled and attempting to install an ISR
* for them will cause the assertion to fail.
*/
#ifndef CONFIG_GIC
__ASSERT(!irq_is_enabled(irq), "IRQ %d is enabled", irq); __ASSERT(!irq_is_enabled(irq), "IRQ %d is enabled", irq);
#endif /* !CONFIG_GIC */
/* If dynamic IRQs are enabled, then the _sw_isr_table is in RAM and /* If dynamic IRQs are enabled, then the _sw_isr_table is in RAM and
* can be modified * can be modified