public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] Hibernation: Move low level resume to disk.c
Date: Tue, 27 Nov 2007 17:06:04 +0100	[thread overview]
Message-ID: <200711271706.05259.rjw@sisk.pl> (raw)
In-Reply-To: <20071127002929.GF9759@elf.ucw.cz>

On Tuesday, 27 of November 2007, Pavel Machek wrote:
> Hi!
> 
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > 
> > Move the low level restore code to kernel/power/disk.c , since the
> > corresponding low level hibernation code is already there.
> > 
> > Make restore fail if device_power_down(PMSG_PRETHAW) returns an
> > error.
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Move looks ok to me.
> 
> 
> >  /**
> > + *	resume_target_kernel - prepare devices that need to be suspended with
> > + *	interrupts off, restore the contents of highmem that have not been
> > + *	restored yet from the image and run the low level code that will restore
> > + *	the remaining contents of memory and switch to the just restored target
> > + *	kernel.
> > + */
> > +
> > +static int resume_target_kernel(void)
> > +{
> > +	int error;
> > +
> > +	local_irq_disable();
> > +	error = device_power_down(PMSG_PRETHAW);
> > +	if (error) {
> > +		printk(KERN_ERR "Some devices failed to power down, "
> > +			KERN_ERR "aborting resume\n");
> > +		goto Enable_irqs;
> 
> Too many KERN_ERR's ;-)

Yeah, will fix.

> . Plus... are you sure this does the right 
> thing? ... .. ... yes, it does. If one device fails,
> device_power_down() powers up the rest using dpm_power_up(). Good.
> 
> ACK... modulo double KERN_ERR.

OK, thanks!

Rafael

  reply	other threads:[~2007-11-27 15:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26 23:25 [PATCH 0/6] Suspend and hibernation code cleanups Rafael J. Wysocki
2007-11-26 23:27 ` [PATCH 1/6] Suspend: Fix compilation warning for CONFIG_SUSPEND unset Rafael J. Wysocki
2007-11-27  0:12   ` Pavel Machek
2007-11-26 23:29 ` [PATCH 2/6] Hibernation: Move low level resume to disk.c Rafael J. Wysocki
2007-11-27  0:29   ` Pavel Machek
2007-11-27 16:06     ` Rafael J. Wysocki [this message]
2007-11-26 23:30 ` [PATCH 3/6] Suspend: Use common prefix in messages Rafael J. Wysocki
2007-11-27  0:21   ` Pavel Machek
2007-11-27 16:16     ` Rafael J. Wysocki
2007-11-26 23:31 ` [PATCH 4/6] Suspend: Fix comment in main.c Rafael J. Wysocki
2007-11-27  0:14   ` Pavel Machek
2007-11-26 23:32 ` [PATCH 5/6] Hibernation: Use common prefix in messages Rafael J. Wysocki
2007-11-27  0:20   ` Pavel Machek
2007-11-26 23:33 ` [PATCH 6/6] Hibernation: Move extern definition to header file Rafael J. Wysocki
2007-11-27  0:23   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711271706.05259.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox