Hi! > Since pm_ops->finish() has to be called after enable_nonboot_cpus() and before > device_resume(), from the userland interface perspective it should be treated > as a part of the atomic suspend and resume operations. For this reason we > need two additional ioctls to be called instead of ATOMIC_SNAPSHOT and > ATOMIC_RESTORE, respectively, when the platform suspend mode is to be used. > > Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl> > --- > kernel/power/power.h | 4 ++ > kernel/power/user.c | 71 +++++++++++++++++++++++++++++++++++++++++++-------- > 2 files changed, 64 insertions(+), 11 deletions(-) > > Index: linux-2.6.19-rc6-mm1/kernel/power/power.h > =================================================================== > --- linux-2.6.19-rc6-mm1.orig/kernel/power/power.h > +++ linux-2.6.19-rc6-mm1/kernel/power/power.h > @@ -133,7 +133,9 @@ struct resume_swap_area { > #define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int) > #define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \ > struct resume_swap_area) > -#define SNAPSHOT_IOC_MAXNR 13 > +#define SNAPSHOT_PLATFORM_SNAPSHOT _IOW(SNAPSHOT_IOC_MAGIC, 14, unsigned int) > +#define SNAPSHOT_PLATFORM_RESTORE _IO(SNAPSHOT_IOC_MAGIC, 15) > +#define SNAPSHOT_IOC_MAXNR 15 Maybe we should add SNAPSHOT_WITH_FLAGS (uint) RESTORE_WITH_FLAGS (uint) with one of those flags being USE_PLATFORM_MODE? We may need more flags in future... ...or maybe have ioctl(fd, USE_PLATFORM_MODE)? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html