kexec jump: in sync with hibernation implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, August 15, 2008 - 9:59 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73bd9c...
Commit:     73bd9c72a29be1e8de008186eea55d333a938804
Parent:     ca195b7f6da3d5dde0bb85a7c322d7de73352653
Author:     Huang Ying <ying.huang@intel.com>
AuthorDate: Fri Aug 15 00:40:24 2008 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Fri Aug 15 08:35:42 2008 -0700

    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>
---
 kernel/kexec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/kexec.c b/kernel/kexec.c
index b816823..17c80fd 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1457,6 +1457,7 @@ int kernel_kexec(void)
 		error = disable_nonboot_cpus();
 		if (error)
 			goto Resume_devices;
+		device_pm_lock();
 		local_irq_disable();
 		/* At this point, device_suspend() has been called,
 		 * but *not* device_power_down(). We *must*
@@ -1485,6 +1486,7 @@ int kernel_kexec(void)
 		device_power_up(PMSG_RESTORE);
  Enable_irqs:
 		local_irq_enable();
+		device_pm_unlock();
 		enable_nonboot_cpus();
  Resume_devices:
 		device_resume(PMSG_RESTORE);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kexec jump: in sync with hibernation implementation, Linux Kernel Mailing ..., (Fri Aug 15, 9:59 am)