ARM: kernel: flush console and disable irqs before machine_shutdown
Tom Cherry [Tue, 13 Mar 2012 22:31:08 +0000 (15:31 -0700)]
Bug 952455

Change-Id: I7400b519eccb274c1b5251032696e10e16ee1c42
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/89876
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

Rebase-Id: R9c44a6e760f12ba62443aa9f7ce7851e9e3d8b75

arch/arm/kernel/process.c

index c86ad0d..c8dea9a 100644 (file)
@@ -288,12 +288,16 @@ void machine_power_off(void)
  */
 void machine_restart(char *cmd)
 {
-       smp_send_stop();
-
        /* Flush the console to make sure all the relevant messages make it
         * out to the console drivers */
        arm_machine_flush_console();
 
+       /* Disable interrupts first */
+       local_irq_disable();
+       local_fiq_disable();
+
+       smp_send_stop();
+
        arm_pm_restart(reboot_mode, cmd);
 
        /* Give a grace period for failure to restart of 1s */