Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / kernel / irqinit.c
index 7b77062dea1123bf0bbbaed7589ea61b6ad4472d..252981afd6c4063cabaf3ebb0145af1f620f8209 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/delay.h>
 
 #include <linux/atomic.h>
-#include <asm/system.h>
 #include <asm/timer.h>
 #include <asm/hw_irq.h>
 #include <asm/pgtable.h>
@@ -306,10 +305,10 @@ void __init native_init_IRQ(void)
         * us. (some of these will be overridden and become
         * 'special' SMP interrupts)
         */
-       for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
+       i = FIRST_EXTERNAL_VECTOR;
+       for_each_clear_bit_from(i, used_vectors, NR_VECTORS) {
                /* IA32_SYSCALL_VECTOR could be used in trap_init already. */
-               if (!test_bit(i, used_vectors))
-                       set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
+               set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]);
        }
 
        if (!acpi_ioapic && !of_ioapic)