aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-03-16 17:34:35 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2009-03-30 15:46:55 -0400
commit749b0afc3a9d90dda3319fd1464a3b32fc225361 (patch)
tree811a0931109bf3ee1204d43c37c9f3d1d7a4b327 /kernel
parent4aecd6718939eb3c4145b248369b65f7483a8a02 (diff)
kexec: Change kexec jump code ordering
Change the ordering of the kexec jump code so that the nonboot CPUs are disabled after calling device drivers' "late suspend" methods. This change reflects the recent modifications of the power management code that is also used by kexec jump. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c19
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();