x86/apic: Disable I/O APIC before shutdown of the local APIC
[cascardo/linux.git] / arch / x86 / kernel / reboot.c
index 7e920bf..618ce26 100644 (file)
@@ -550,6 +550,10 @@ static void native_machine_emergency_restart(void)
 void native_machine_shutdown(void)
 {
        /* Stop the cpus and apics */
+#ifdef CONFIG_X86_IO_APIC
+       disable_IO_APIC();
+#endif
+
 #ifdef CONFIG_SMP
        /*
         * Stop all of the others. Also disable the local irq to
@@ -562,10 +566,6 @@ void native_machine_shutdown(void)
 
        lapic_shutdown();
 
-#ifdef CONFIG_X86_IO_APIC
-       disable_IO_APIC();
-#endif
-
 #ifdef CONFIG_HPET_TIMER
        hpet_disable();
 #endif