Commit b16aaf67 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

arm/ipipe: fix off-by-one last IPI number

Although the regular SMP code is fine with keeping IPI_CPU_BACKTRACE
out of this count, we don't as we depend on it to figure out the exact
number of IPI vectors in use. The last IPI number we must allocate is
NR_IPI + IPIPE_LAST_IPI + 1, to account for the empty CPU_BACKTRACE

This bug badly breaks ipipe_raise_irq() by causing a conflict in the
VIRQ namespace between the last IPI and the first allocated VIRQ
allocated by the generic code (detected with deferred out-of-band
printk() messages not showing up).
parent 6117d678
......@@ -633,7 +633,7 @@ void __ipipe_ipis_alloc(void)
if (__ipipe_first_ipi)
last_ipi = NR_IPI + IPIPE_LAST_IPI;
last_ipi = NR_IPI + IPIPE_LAST_IPI + 1; /* count CPU_BACKTRACE in */
for (ipi = 0; ipi <= last_ipi; ipi++) {
virq = ipipe_alloc_virq();
if (ipi == IPI_IPIPE_FIRST)
Supports Markdown
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