From: Vivek Goyal A minor fix to the patch which remembers the location of where i8259 is connected. Now counter i has been replaced by apic. counter i is having some junk value which was leading to non-detection of i8259 connected to IOAPIC. Signed-off-by: Vivek Goyal Cc: Eric W. Biederman Cc: Andi Kleen Signed-off-by: Andrew Morton --- arch/i386/kernel/io_apic.c | 2 +- arch/x86_64/kernel/io_apic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN arch/i386/kernel/io_apic.c~x86_64-io_apicc-memorize-at-bootup-where-the-i8259-is-fix arch/i386/kernel/io_apic.c --- devel/arch/i386/kernel/io_apic.c~x86_64-io_apicc-memorize-at-bootup-where-the-i8259-is-fix 2005-11-26 22:16:45.000000000 -0800 +++ devel-akpm/arch/i386/kernel/io_apic.c 2005-11-26 22:16:45.000000000 -0800 @@ -1649,7 +1649,7 @@ static void __init enable_IO_APIC(void) for(apic = 0; apic < nr_ioapics; apic++) { int pin; /* See if any of the pins is in ExtINT mode */ - for(pin = 0; pin < nr_ioapic_registers[i]; pin++) { + for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { struct IO_APIC_route_entry entry; spin_lock_irqsave(&ioapic_lock, flags); *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); diff -puN arch/x86_64/kernel/io_apic.c~x86_64-io_apicc-memorize-at-bootup-where-the-i8259-is-fix arch/x86_64/kernel/io_apic.c --- devel/arch/x86_64/kernel/io_apic.c~x86_64-io_apicc-memorize-at-bootup-where-the-i8259-is-fix 2005-11-26 22:16:45.000000000 -0800 +++ devel-akpm/arch/x86_64/kernel/io_apic.c 2005-11-26 22:16:45.000000000 -0800 @@ -1257,7 +1257,7 @@ static void __init enable_IO_APIC(void) for(apic = 0; apic < nr_ioapics; apic++) { int pin; /* See if any of the pins is in ExtINT mode */ - for(pin = 0; pin < nr_ioapic_registers[i]; pin++) { + for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { struct IO_APIC_route_entry entry; spin_lock_irqsave(&ioapic_lock, flags); *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); _