Hi, On Tuesday, 1 May 2007 10:51, Pavel Machek wrote: > Hi! > > > I'd like to modify the kernel's behavior related to the SNAPSHOT_PMOPS > > ioctl. Namely, currently PMOPS_ENTER works regardless of the value > > of "suspend mode" indicated by "cat /sys/power/disk". This doesn't seem to > > be quite right to me, so I'd like to make s2disk set "/sys/power/disk" to > > "platform" before the suspend if there's "shutdown mode = platform" in the > > configuration file. > > I do not think I like that change. I'd prefer to keep ioctls() and > /sys/power to be separate (after all, one is "snapshoting", and one is > "hibernation")...
They both use the same underlying code, though. > so there's at least theoretical chance to remove /sys/power in future. Well, I'm not sure if we can remove it any time soon (if at all), but never mind. In the meantime I've started to look at the ACPI S4 code and I wonder if we actually should call platform_prepare() and platform_finish() around device_suspend() and device_resume() in the hibernation (swsusp) code paths at all. Namely, what seems to be appropriate is to call platform_prepare() right before platform_enter() is called and not to call platform_finish() at all. Perhaps we should also suspend devices before calling platform_enter(). The spec seems to assume that the boot loader will load the suspend image and in that case platform_finish() could be called after the image restoration (the control should return to the kernel in the ACPI code implementing platform_enter()). However, we reinitialize the system from scratch, boot the kernel and _then_ restore the image, so I don't see a reason for calling platform_finish(). On a related note, I like the idea with the boot loader loading the suspend image. In that case we wouldn't have to deal with the 'old kernel - new kernel' transition and it would make more sense to use the .resume() callbacks after the image restoration. Greetings, Rafael ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel