Re: Re: Hibernate after alarm wakes from STR

Matthew Garrett
2007-07-11T01:59:48Z

On Wed, Jul 11, 2007 at 11:39:37AM +1000, Nigel Cunningham wrote:

> Yeah, that is a bit confusing. At the moment, I'm doing the suspend to ram
> platform dependent preparation and cleanup in this scenario. That's
> definitely the right thing to do in the case where we write an image, then
> suspend to ram, wake and continue working without running running out of
> battery (writing the image is redundant in that case). Where we end up
> properly powering down after suspending to ram, I believe we don't run the
> pm_ops->finish after doing the atomic restore when resuming the image.

I'm not convinced this can work terribly well. It's not unlikely that
hardware will need different state stored over different types of
suspend. Can you separate out the saving of kernel memory and userspace
memory, then resume/suspend/save the new kernel state without touching
the userspace state?

--
Matthew Garrett | mjg59@srcf.ucam.org