aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r--kernel/kexec.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c7fd6692939d..93eed85fe017 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1450,11 +1450,7 @@ int kernel_kexec(void)
1450 error = device_suspend(PMSG_FREEZE); 1450 error = device_suspend(PMSG_FREEZE);
1451 if (error) 1451 if (error)
1452 goto Resume_console; 1452 goto Resume_console;
1453 error = disable_nonboot_cpus();
1454 if (error)
1455 goto Resume_devices;
1456 device_pm_lock(); 1453 device_pm_lock();
1457 local_irq_disable();
1458 /* At this point, device_suspend() has been called, 1454 /* At this point, device_suspend() has been called,
1459 * but *not* device_power_down(). We *must* 1455 * but *not* device_power_down(). We *must*
1460 * device_power_down() now. Otherwise, drivers for 1456 * device_power_down() now. Otherwise, drivers for
@@ -1464,12 +1460,15 @@ int kernel_kexec(void)
1464 */ 1460 */
1465 error = device_power_down(PMSG_FREEZE); 1461 error = device_power_down(PMSG_FREEZE);
1466 if (error) 1462 if (error)
1467 goto Enable_irqs; 1463 goto Resume_devices;
1468 1464 error = disable_nonboot_cpus();
1465 if (error)
1466 goto Enable_cpus;
1467 local_irq_disable();
1469 /* Suspend system devices */ 1468 /* Suspend system devices */
1470 error = sysdev_suspend(PMSG_FREEZE); 1469 error = sysdev_suspend(PMSG_FREEZE);
1471 if (error) 1470 if (error)
1472 goto Power_up_devices; 1471 goto Enable_irqs;
1473 } else 1472 } else
1474#endif 1473#endif
1475 { 1474 {
@@ -1483,13 +1482,13 @@ int kernel_kexec(void)
1483#ifdef CONFIG_KEXEC_JUMP 1482#ifdef CONFIG_KEXEC_JUMP
1484 if (kexec_image->preserve_context) { 1483 if (kexec_image->preserve_context) {
1485 sysdev_resume(); 1484 sysdev_resume();
1486 Power_up_devices:
1487 device_power_up(PMSG_RESTORE);
1488 Enable_irqs: 1485 Enable_irqs:
1489 local_irq_enable(); 1486 local_irq_enable();
1490 device_pm_unlock(); 1487 Enable_cpus:
1491 enable_nonboot_cpus(); 1488 enable_nonboot_cpus();
1489 device_power_up(PMSG_RESTORE);
1492 Resume_devices: 1490 Resume_devices:
1491 device_pm_unlock();
1493 device_resume(PMSG_RESTORE); 1492 device_resume(PMSG_RESTORE);
1494 Resume_console: 1493 Resume_console:
1495 resume_console(); 1494 resume_console();