From: Huang Ying Date: Fri, 15 Aug 2008 07:40:24 +0000 (-0700) Subject: kexec jump: in sync with hibernation implementation X-Git-Tag: v2.6.27-rc4~92 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73bd9c72a29be1e8de008186eea55d333a938804;p=linux-2.6 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 Acked-by: Pavel Machek Cc: "Rafael J. Wysocki" Cc: "Eric W. Biederman" Cc: Vivek Goyal Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kexec.c b/kernel/kexec.c index b81682312d..17c80fdc45 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);