From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH -mm 2/5] Hibernation: Rework platform support ioctls
Date: Thu, 6 Sep 2007 01:57:29 +0000 [thread overview]
Message-ID: <20070906015729.GB5097@ucw.cz> (raw)
In-Reply-To: <200709022319.38762.rjw@sisk.pl>
Hi!
> Modify the hibernation userland interface by adding two new ioctls to it,
> SNAPSHOT_PLATFORM_SUPPORT and SNAPSHOT_POWER_OFF, that can be used,
> respectively, to switch the hibernation platform support on/off and to make the
> kernel transition the system to the hibernation state (eg. ACPI S4) using the
> platform (eg. ACPI) driver.
>
> These ioctls are intended to replace the misdesigned SNAPSHOT_PMOPS ioctl,
> which from now is regarded as obsolete and will be removed in the future.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
ACK.
> +/*
> + * NOTE: The SNAPSHOT_PMOPS ioctl is obsolete and will be removed in the
> + * future. It is only preserved here for compatibility with existing userland
> + * utilities.
> + */
Perhaps that paragraph from Documentation should be moved here, so
that people know what this obsolete ioctl() is expected to do?
> @@ -95,24 +101,6 @@ SNAPSHOT_S2RAM - suspend to RAM; using t
> to resume the system from RAM if there's enough battery power or restore
> its state on the basis of the saved suspend image otherwise)
>
> -SNAPSHOT_PMOPS - enable the usage of the hibernation_ops->prepare,
> - hibernate_ops->enter and hibernation_ops->finish methods (the in-kernel
> - swsusp knows these as the "platform method") which are needed on many
> - machines to (among others) speed up the resume by letting the BIOS skip
> - some steps or to let the system recognise the correct state of the
> - hardware after the resume (in particular on many machines this ensures
> - that unplugged AC adapters get correctly detected and that kacpid does
> - not run wild after the resume). The last ioctl() argument can take one
> - of the three values, defined in kernel/power/power.h:
> - PMOPS_PREPARE - make the kernel carry out the
> - hibernation_ops->prepare() operation
> - PMOPS_ENTER - make the kernel power off the system by calling
> - hibernation_ops->enter()
> - PMOPS_FINISH - make the kernel carry out the
> - hibernation_ops->finish() operation
> - Note that the actual constants are misnamed because they surface
> - internal kernel implementation details that have changed.
> -
> The device's read() operation can be used to transfer the snapshot image from
> the kernel. It has the following limitations:
> - you cannot read() more than one virtual memory page at a time
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-09-06 1:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-02 21:15 [PATCH -mm 0/5] Hibernation: Clean up userland interface Rafael J. Wysocki
2007-09-02 21:17 ` [PATCH -mm 1/5] Hibernation: Introduce SNAPSHOT_GET_IMAGE_SIZE ioctl Rafael J. Wysocki
2007-09-03 3:17 ` Pavel Machek
2007-09-02 21:19 ` [PATCH -mm 2/5] Hibernation: Rework platform support ioctls Rafael J. Wysocki
2007-09-06 1:57 ` Pavel Machek [this message]
2007-09-02 21:21 ` [PATCH -mm 3/5] Hibernation: Correct definitions of some ioctls Rafael J. Wysocki
2007-09-03 3:25 ` Pavel Machek
2007-09-03 21:14 ` Rafael J. Wysocki
2007-09-02 21:22 ` [PATCH -mm 4/5] Hibernation: Mark SNAPSHOT_SET_SWAP_FILE ioctl as deprecated Rafael J. Wysocki
2007-09-06 2:08 ` Pavel Machek
2007-09-02 21:28 ` [PATCH -mm 5/5] Hibernation: Introduce exportable suspend ioctls header Rafael J. Wysocki
2007-09-03 3:29 ` Pavel Machek
2007-09-03 21:15 ` Rafael J. Wysocki
2007-09-03 9:43 ` Johannes Berg
2007-09-03 21:15 ` 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=20070906015729.GB5097@ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-pm@lists.linux-foundation.org \
--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