aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/io_apic_32.c')
-rw-r--r--arch/x86/kernel/io_apic_32.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index 5f10c7189534..0c55e9d86f69 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -1198,7 +1198,7 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }
1198static int __assign_irq_vector(int irq) 1198static int __assign_irq_vector(int irq)
1199{ 1199{
1200 static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; 1200 static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0;
1201 int vector, offset, i; 1201 int vector, offset;
1202 1202
1203 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 1203 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
1204 1204
@@ -1215,11 +1215,8 @@ next:
1215 } 1215 }
1216 if (vector == current_vector) 1216 if (vector == current_vector)
1217 return -ENOSPC; 1217 return -ENOSPC;
1218 if (vector == SYSCALL_VECTOR) 1218 if (test_and_set_bit(vector, used_vectors))
1219 goto next; 1219 goto next;
1220 for (i = 0; i < NR_IRQ_VECTORS; i++)
1221 if (irq_vector[i] == vector)
1222 goto next;
1223 1220
1224 current_vector = vector; 1221 current_vector = vector;
1225 current_offset = offset; 1222 current_offset = offset;
@@ -2295,6 +2292,12 @@ static inline void __init check_timer(void)
2295 2292
2296void __init setup_IO_APIC(void) 2293void __init setup_IO_APIC(void)
2297{ 2294{
2295 int i;
2296
2297 /* Reserve all the system vectors. */
2298 for (i = FIRST_SYSTEM_VECTOR; i < NR_VECTORS; i++)
2299 set_bit(i, used_vectors);
2300
2298 enable_IO_APIC(); 2301 enable_IO_APIC();
2299 2302
2300 if (acpi_ioapic) 2303 if (acpi_ioapic)