diff options
| -rw-r--r-- | kernel/kexec.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index dade9af6bf21..93eed85fe017 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
| @@ -1450,9 +1450,6 @@ 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 | /* At this point, device_suspend() has been called, | 1454 | /* At this point, device_suspend() has been called, |
| 1458 | * but *not* device_power_down(). We *must* | 1455 | * but *not* device_power_down(). We *must* |
| @@ -1463,13 +1460,15 @@ int kernel_kexec(void) | |||
| 1463 | */ | 1460 | */ |
| 1464 | error = device_power_down(PMSG_FREEZE); | 1461 | error = device_power_down(PMSG_FREEZE); |
| 1465 | if (error) | 1462 | if (error) |
| 1466 | goto Unlock_pm; | 1463 | goto Resume_devices; |
| 1467 | 1464 | error = disable_nonboot_cpus(); | |
| 1465 | if (error) | ||
| 1466 | goto Enable_cpus; | ||
| 1468 | local_irq_disable(); | 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: | 1485 | Enable_irqs: |
| 1487 | local_irq_enable(); | 1486 | local_irq_enable(); |
| 1488 | device_power_up(PMSG_RESTORE); | 1487 | Enable_cpus: |
| 1489 | Unlock_pm: | ||
| 1490 | device_pm_unlock(); | ||
| 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(); |
