mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
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>
This commit is contained in:
parent
ca195b7f6d
commit
73bd9c72a2
@ -1457,6 +1457,7 @@ int kernel_kexec(void)
|
|||||||
error = disable_nonboot_cpus();
|
error = disable_nonboot_cpus();
|
||||||
if (error)
|
if (error)
|
||||||
goto Resume_devices;
|
goto Resume_devices;
|
||||||
|
device_pm_lock();
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
/* At this point, device_suspend() has been called,
|
/* At this point, device_suspend() has been called,
|
||||||
* but *not* device_power_down(). We *must*
|
* but *not* device_power_down(). We *must*
|
||||||
@ -1485,6 +1486,7 @@ int kernel_kexec(void)
|
|||||||
device_power_up(PMSG_RESTORE);
|
device_power_up(PMSG_RESTORE);
|
||||||
Enable_irqs:
|
Enable_irqs:
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
device_pm_unlock();
|
||||||
enable_nonboot_cpus();
|
enable_nonboot_cpus();
|
||||||
Resume_devices:
|
Resume_devices:
|
||||||
device_resume(PMSG_RESTORE);
|
device_resume(PMSG_RESTORE);
|
||||||
|
Loading…
Reference in New Issue
Block a user