x86/apic: do not clear nr_irqs_gsi if no legacy irqs
authorJacob Pan <jacob.jun.pan@linux.intel.com>
Fri, 15 Jul 2011 13:39:07 +0000 (14:39 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:36:17 +0000 (12:36 -0800)
nr_legacy_irqs is set in probe_nr_irqs_gsi, we should not clear it after that.
Otherwise, the result is that MSI irqs will be allocated from the wrong range
for the systems without legacy PIC.

Change-Id: Ib73f1de23d34cf5b8b549d43c371d7d8a58ecb52
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
arch/x86/kernel/apic/io_apic.c

index e529339..2b92e1d 100644 (file)
@@ -197,10 +197,8 @@ int __init arch_early_irq_init(void)
        struct irq_cfg *cfg;
        int count, node, i;
 
-       if (!legacy_pic->nr_legacy_irqs) {
-               nr_irqs_gsi = 0;
+       if (!legacy_pic->nr_legacy_irqs)
                io_apic_irqs = ~0UL;
-       }
 
        for (i = 0; i < nr_ioapics; i++) {
                ioapics[i].saved_registers =