Re: [PATCH][2.5] avoid scribbling in IDT with high interrupt count.

Linus Torvalds (torvalds@transmeta.com)
Mon, 7 Apr 2003 08:27:59 -0700 (PDT)


On Mon, 7 Apr 2003, Zwane Mwaikambo wrote:
>
> On systems with high interrupt counts we end up overshooting the
> interrupt[] array and dumping garbage entry points into the idt. This
> patch checks for out of bounds access during ioapic setup as well as
> returning -ENOSPC when we run out of vectors to assign in
> assign_irq_vector, thus allowing us to remove the panic and boot a 320
> interrupt source system with 2.5.66.

Zwane - is there any reason we couldn't just start re-using irq vector
offsets when this happens? We already re-use the vectors themselves, so
restarting the offset pointer shouldn't really _change_ anything.

In other words, I'm wondering if this simpler patch wouldn't be sufficient
instead?

Can you please test this, and re-submit (and if you can explain why your
patch is better, please do so - I have nothing fundamentally against it, I
just want to understand _why_ the complexity is needed).

Thanks,

Linus

--- 1.58/arch/i386/kernel/io_apic.c Thu Mar 20 03:11:41 2003
+++ edited/arch/i386/kernel/io_apic.c Mon Apr 7 08:25:48 2003
@@ -1110,12 +1110,9 @@
goto next;

if (current_vector > FIRST_SYSTEM_VECTOR) {
- offset++;
+ offset = (offset+1) & 7;
current_vector = FIRST_DEVICE_VECTOR + offset;
}
-
- if (current_vector == FIRST_SYSTEM_VECTOR)
- panic("ran out of interrupt sources!");

IO_APIC_VECTOR(irq) = current_vector;
return current_vector;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/