Re: [PATCH 3/3 -mm] kexec based hibernation -v6: kexec hibernate/resume

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rafael J. Wysocki <rjw@...>
Cc: Eric W. Biederman <ebiederm@...>, Pavel Machek <pavel@...>, <nigel@...>, Andrew Morton <akpm@...>, Jeremy Maitin-Shepard <jbms@...>, <linux-kernel@...>, <linux-pm@...>, Kexec Mailing List <kexec@...>
Date: Monday, November 19, 2007 - 10:50 pm

On Tue, 2007-11-20 at 03:24 +0100, Rafael J. Wysocki wrote:

Situation is a little different between u/swsusp and khiberantion.

u/swsusp:

platform_start();
suspend console();
device_suspend(PMSG_FREEZE);
platform_pre_snapshot();
disable_nonboot_cpus();
local_irq_disable();
device_power_down(PMSG_FREEZE);
/* create snapshot */
device_power_up();
local_irq_enable();
enable_nonboot_cpus();
platform_finish();
device_resume();
resume_console();
/* write the image out */
hibernation_ops->start();
suspend_console();
device_suspend(PMSG_SUSPEND);
hibernation_ops->prepare();
disable_nonboot_cpus();
local_irq_disable();
device_power_down(PMSG_SUSPEND);
hibernation_ops->enter();

khibernation:

suspend_console();
platform_start();
device_suspend(PMSG_FREEZE);
platform_pre_snapshot();
disable_nonboot_cpus();
local_irq_disable();
device_power_down(PMSG_FREEZE);
/* jump to kexeced (hibernating) kernel */
/* in kexeced kernel */
device_power_up();
local_irq_eanble();
enable_nonboot_cpus();
device_resume();
resume_console();
/* write the image */
suspend_console();
device_suspend(PMSG_FREEZE);
disable_nonboot_cpus();
local_irq_disable();
device_power_down(PMSG_FREEZE);
/* jump to original (hibernated) kernel */
/* in original kernel */
hibernation_ops->enter();

The difference is:

- In u/swsusp, ACPI methods are executed twice, before writing out the
image and after writing out the image.
- After writing out the image, the PMSG_SUSPEND is used instead of
PMSG_FREEZE.

Some questions:

- What is the difference between PMSG_SUSPEND and PMSG_FREEZE?
- The ACPI methods should be executed once or twice? According to ACPI
specification?

Best Regards,
Huang Ying
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/3 -mm] kexec based hibernation -v6: kexec hiber..., Rafael J. Wysocki, (Mon Nov 19, 2:22 pm)
Re: [PATCH 3/3 -mm] kexec based hibernation -v6: kexec hiber..., Rafael J. Wysocki, (Mon Nov 19, 10:24 pm)
Re: [PATCH 3/3 -mm] kexec based hibernation -v6: kexec hiber..., Huang, Ying, (Mon Nov 19, 10:50 pm)
Re: [PATCH 3/3 -mm] kexec based hibernation -v6: kexec hiber..., Rafael J. Wysocki, (Tue Nov 20, 8:00 pm)
Re: [PATCH 3/3 -mm] kexec based hibernation -v6: kexec hiber..., Rafael J. Wysocki, (Wed Nov 21, 4:09 pm)
Re: [linux-pm] Re: [PATCH 3/3 -mm] kexec based hibernation -..., Rafael J. Wysocki, (Tue Nov 20, 8:00 pm)