x86: use identical loop constructs in 32-bit and 64-bit native_init_IRQ()
authorPekka Enberg <penberg@cs.helsinki.fi>
Thu, 9 Apr 2009 08:52:22 +0000 (11:52 +0300)
committerIngo Molnar <mingo@elte.hu>
Fri, 10 Apr 2009 12:35:54 +0000 (14:35 +0200)
Impact: cleanup

Reviewed-by Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/irqinit_32.c
arch/x86/kernel/irqinit_64.c

index 9ba68c4..1029a18 100644 (file)
@@ -205,7 +205,7 @@ 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++) {
+       for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
                /* SYSCALL_VECTOR was reserved in trap_init. */
                if (i != SYSCALL_VECTOR)
                        set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
index 8cd1053..1c8858b 100644 (file)
@@ -159,15 +159,16 @@ void __init native_init_IRQ(void)
        int i;
 
        init_ISA_irqs();
+
        /*
         * Cover the whole vector space, no vector can escape
         * us. (some of these will be overridden and become
         * 'special' SMP interrupts)
         */
-       for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
-               int vector = FIRST_EXTERNAL_VECTOR + i;
-               if (vector != IA32_SYSCALL_VECTOR)
-                       set_intr_gate(vector, interrupt[i]);
+       for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
+               /* IA32_SYSCALL_VECTOR was reserved in trap_init. */
+               if (i != IA32_SYSCALL_VECTOR)
+                       set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
        }
 
        apic_intr_init();