x86: make 32bit to call enable_IO_APIC early like 64bit
authorYinghai Lu <yinghai@kernel.org>
Sun, 15 Feb 2009 07:57:28 +0000 (23:57 -0800)
committerIngo Molnar <mingo@elte.hu>
Sun, 15 Feb 2009 12:23:46 +0000 (13:23 +0100)
Impact: cleanup

So we remove some #ifdefs.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic.c
arch/x86/kernel/io_apic.c
arch/x86/kernel/smpboot.c

index 8bd801db24d98b427511bbd0b30455f0d56a8f00..b8616aaa168d367f3fe30c7b94ea665ba1bf344c 100644 (file)
@@ -1646,19 +1646,19 @@ int __init APIC_init_uniprocessor(void)
        physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
        setup_local_APIC();
 
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_X86_IO_APIC
        /*
         * Now enable IO-APICs, actually call clear_IO_APIC
         * We need clear_IO_APIC before enabling vector on BP
         */
        if (!skip_ioapic_setup && nr_ioapics)
                enable_IO_APIC();
-#endif
 
-#ifdef CONFIG_X86_IO_APIC
        if (!smp_found_config || skip_ioapic_setup || !nr_ioapics)
-#endif
                localise_nmi_watchdog();
+#else
+       localise_nmi_watchdog();
+#endif
        end_local_APIC_setup();
 
 #ifdef CONFIG_X86_IO_APIC
index 7248ca11bdcda126d5aba287738a90628c687733..0b7cde3da48b362100eacf6635dafc74dd5b996c 100644 (file)
@@ -3057,13 +3057,9 @@ out:
 void __init setup_IO_APIC(void)
 {
 
-#ifdef CONFIG_X86_32
-       enable_IO_APIC();
-#else
        /*
         * calling enable_IO_APIC() is moved to setup_local_APIC for BP
         */
-#endif
 
        io_apic_irqs = ~PIC_IRQS;
 
index af57f88186e75e8c50c6d54335005953c51d7684..10834954e3014595fa6cf0087740b755fad66c32 100644 (file)
@@ -1154,13 +1154,12 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
         */
        setup_local_APIC();
 
-#ifdef CONFIG_X86_64
        /*
         * Enable IO APIC before setting up error vector
         */
        if (!skip_ioapic_setup && nr_ioapics)
                enable_IO_APIC();
-#endif
+
        end_local_APIC_setup();
 
        map_cpu_to_logical_apicid();