From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: Re: [linux-pm] Re: Hibernate after alarm wakes from STR Date: Wed, 11 Jul 2007 02:59:48 +0100 Message-ID: <20070711015948.GA30659@srcf.ucam.org> References: <20070330235759.GC4252@cosmic.amd.com> <200707111053.36590.nigel@nigel.suspend2.net> <20070711012301.GA30596@srcf.ucam.org> <200707111139.38667.nigel@nigel.suspend2.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from cavan.codon.org.uk ([217.147.92.49]:46341 "EHLO vavatch.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755358AbXGKCAP (ORCPT ); Tue, 10 Jul 2007 22:00:15 -0400 Content-Disposition: inline In-Reply-To: <200707111139.38667.nigel@nigel.suspend2.net> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Nigel Cunningham Cc: nigel@suspend2.net, David Brownell , linux-pm@lists.linux-foundation.org, Marcelo Tosatti , linux-acpi@vger.kernel.org, Richard Hughes , rtc-linux@googlegroups.com 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