From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nigel Cunningham Subject: Re: [PATCH 1/4] Hibernate: Call platform_begin before swsusp_shrink_memory Date: Thu, 23 Oct 2008 09:37:52 +1100 Message-ID: <1224715072.8156.4.camel@nigel-laptop> References: <200810222249.20629.rjw@sisk.pl> <200810222250.36537.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200810222250.36537.rjw@sisk.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , pm list , Ingo Molnar List-Id: linux-pm@vger.kernel.org Hi. On Wed, 2008-10-22 at 22:50 +0200, Rafael J. Wysocki wrote: > From: Zhang Rui > > Hibernate: Call platform_begin before swsusp_shrink_memory > > Call platform_begin() before swsusp_shrink_memory() so that we can > always allocate enough memory to save the ACPI NVS region from > platform_begin(). > > Signed-off-by: Zhang Rui > Signed-off-by: Rafael J. Wysocki > --- > kernel/power/disk.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > Index: linux-2.6/kernel/power/disk.c > =================================================================== > --- linux-2.6.orig/kernel/power/disk.c > +++ linux-2.6/kernel/power/disk.c > @@ -267,12 +267,12 @@ int hibernation_snapshot(int platform_mo > { > int error, ftrace_save; > > - /* Free memory before shutting down devices. */ > - error = swsusp_shrink_memory(); > + error = platform_begin(platform_mode); > if (error) > return error; > > - error = platform_begin(platform_mode); > + /* Free memory before shutting down devices. */ > + error = swsusp_shrink_memory(); > if (error) > goto Close; > Acked-by: Nigel Cunningham