Commit b0af9f87 authored by Philippe Gerum's avatar Philippe Gerum

ipipe: do not read irq_desc[] out of bounds with virqs

Pipeline-originated virtual IRQs have no regular descriptors. When
sparse IRQ mapping is disabled, we have to make sure not to
dereference irq_desc(] for those synthetic interrupts.
parent 2d56c541
......@@ -8,7 +8,7 @@ extern int nr_irqs;
#if !defined(CONFIG_IPIPE) || defined(CONFIG_SPARSE_IRQ)
extern struct irq_desc *irq_to_desc(unsigned int irq);
#else
#define irq_to_desc(irq) (&irq_desc[irq])
#define irq_to_desc(irq) ({ ipipe_virtual_irq_p(irq) ? NULL : &irq_desc[irq]; })
#endif
unsigned int irq_get_next_irq(unsigned int offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment