Commit f2898927 authored by Linus Torvalds's avatar Linus Torvalds

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.
parent 80d316b7
...@@ -1116,13 +1116,10 @@ static int __init assign_irq_vector(int irq) ...@@ -1116,13 +1116,10 @@ static int __init assign_irq_vector(int irq)
goto next; goto next;
if (current_vector > FIRST_SYSTEM_VECTOR) { if (current_vector > FIRST_SYSTEM_VECTOR) {
offset++; offset = (offset + 1) & 7;
current_vector = FIRST_DEVICE_VECTOR + offset; current_vector = FIRST_DEVICE_VECTOR + offset;
} }
if (current_vector == FIRST_SYSTEM_VECTOR)
panic("ran out of interrupt sources!");
IO_APIC_VECTOR(irq) = current_vector; IO_APIC_VECTOR(irq) = current_vector;
return current_vector; return current_vector;
} }
......
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