From f289892705ed8d3526466098c6a95ded559dad98 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 6 Apr 2003 19:41:54 -0700 Subject: [PATCH] The irq vector offset should spread the irq's out evenly, which implies that it should vary between 0-7, not any further (the higher bits are done by updating current_vector by 8). This also means that we don't have any overflow condition. --- arch/i386/kernel/io_apic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 851df2fdc79cc..8c75d76c5271c 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -1116,13 +1116,10 @@ next: 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; } -- 2.53.0