From: Andrew Morton <akpm@linux-foundation.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: David Brownell <david-b@pacbell.net>, Len Brown <lenb@kernel.org>,
LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
pm list <linux-pm@lists.linux-foundation.org>,
Stefan Becker <Stefan.Becker@nokia.com>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [Resend][PATCH -mm] Hibernation: Enter platform hibernation state in a consistent way (rev. 4)
Date: Fri, 14 Sep 2007 16:37:17 -0700 [thread overview]
Message-ID: <20070914163717.8a0cb637.akpm@linux-foundation.org> (raw)
In-Reply-To: <200709121314.09676.rjw@sisk.pl>
On Wed, 12 Sep 2007 13:14:08 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> + if (!hibernation_ops)
> + return -ENOSYS;
> +
> + /*
> + * We have cancelled the power transition by running
> + * hibernation_ops->finish() before saving the image, so we should let
> + * the firmware know that we're going to enter the sleep state after all
> + */
> + error = hibernation_ops->start();
> + if (error)
> + return error;
> +
> + suspend_console();
> + error = device_suspend(PMSG_SUSPEND);
> + if (error)
> + return error;
> +
> + error = hibernation_ops->prepare();
> + if (error)
> + goto Resume_devices;
> +
> + error = disable_nonboot_cpus();
> + if (error)
> + goto Finish;
> +
> + local_irq_disable();
> + error = device_power_down(PMSG_SUSPEND);
> + if (!error) {
> + hibernation_ops->enter();
> + /* We should never get here */
> + while (1);
> }
> + local_irq_enable();
> +
Confused. afacit there's no way for the caller of this function to know
whether or not suspend_console() was called, so the error recovery doesn't
know whether or not to run resume_console(). How does all that work?
next prev parent reply other threads:[~2007-09-14 23:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 11:14 [Resend][PATCH -mm] Hibernation: Enter platform hibernation state in a consistent way (rev. 4) Rafael J. Wysocki
2007-09-14 23:37 ` Andrew Morton [this message]
2007-09-15 0:30 ` Rafael J. Wysocki
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=20070914163717.8a0cb637.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Stefan.Becker@nokia.com \
--cc=david-b@pacbell.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/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