i386/ioapic_abi: Optimize the GSI search a little bit
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 11 Dec 2011 11:33:33 +0000 (19:33 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 11 Dec 2011 11:33:33 +0000 (19:33 +0800)
This merges dc844205199e9b290c8298fcc826b3c770542be1

sys/platform/pc32/apic/ioapic_abi.c

index e204601..0b09471 100644 (file)
@@ -760,7 +760,7 @@ ioapic_abi_find_gsi(int gsi, enum intr_trigger trig, enum intr_polarity pola)
        KKASSERT(trig == INTR_TRIGGER_EDGE || trig == INTR_TRIGGER_LEVEL);
        KKASSERT(pola == INTR_POLARITY_HIGH || pola == INTR_POLARITY_LOW);
 
-       for (irq = 0; irq < IOAPIC_HWI_VECTORS; ++irq) {
+       for (irq = 0; irq < ioapic_abi_line_irq_max; ++irq) {
                const struct ioapic_irqmap *map = &ioapic_irqmaps[irq];
 
                if (map->im_gsi == gsi) {