diff options
author | Huang Ying <ying.huang@intel.com> | 2008-08-15 03:40:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 11:35:42 -0400 |
commit | 73bd9c72a29be1e8de008186eea55d333a938804 (patch) | |
tree | f01823f4f93ca08fa7619b093dd8eed6ba5b58ab /kernel | |
parent | ca195b7f6da3d5dde0bb85a7c322d7de73352653 (diff) |
kexec jump: in sync with hibernation implementation
Add device_pm_lock() and device_pm_unlock() in kernel_kexec() in sync with
current hibernation implementation.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kexec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index b81682312dc4..17c80fdc453b 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -1457,6 +1457,7 @@ int kernel_kexec(void) | |||
1457 | error = disable_nonboot_cpus(); | 1457 | error = disable_nonboot_cpus(); |
1458 | if (error) | 1458 | if (error) |
1459 | goto Resume_devices; | 1459 | goto Resume_devices; |
1460 | device_pm_lock(); | ||
1460 | local_irq_disable(); | 1461 | local_irq_disable(); |
1461 | /* At this point, device_suspend() has been called, | 1462 | /* At this point, device_suspend() has been called, |
1462 | * but *not* device_power_down(). We *must* | 1463 | * but *not* device_power_down(). We *must* |
@@ -1485,6 +1486,7 @@ int kernel_kexec(void) | |||
1485 | device_power_up(PMSG_RESTORE); | 1486 | device_power_up(PMSG_RESTORE); |
1486 | Enable_irqs: | 1487 | Enable_irqs: |
1487 | local_irq_enable(); | 1488 | local_irq_enable(); |
1489 | device_pm_unlock(); | ||
1488 | enable_nonboot_cpus(); | 1490 | enable_nonboot_cpus(); |
1489 | Resume_devices: | 1491 | Resume_devices: |
1490 | device_resume(PMSG_RESTORE); | 1492 | device_resume(PMSG_RESTORE); |