* suspend to disk modes, default mode
@ 2007-03-20 0:47 Johannes Berg
2007-03-20 0:51 ` Johannes Berg
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Johannes Berg @ 2007-03-20 0:47 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-pm, Pavel Machek
[-- Attachment #1.1: Type: text/plain, Size: 1199 bytes --]
Hi,
This suspend to disk modes stuff really sucks. The last time I looked
must have been a long time ago because then shutdown was default. Now I
find that in November 06 you changed it to be platform by default.
The problem with this is that not all platforms support the "platform"
mode.
I have a pm_ops struct for PMU-based Apple powerpc machines that doesn't
set pm_disk_mode in order not to allow the platform mode because that
currently fails.
I also used to think this was for implementing suspend-to-both, is that
wrong? In any case, I can't live with it being platform by default
because that goes into really weird behaviour, or I need to special-case
the ->enter callback for suspend to disk to just shut down again.
Could you please post a patch to change the documentation in pm.h to
indicate what the pm_disk_mode is intended for? It also doesn't help my
willingness to work on and with the generic suspend to disk stuff that
the patch I'm referring to was posted as if it was ACPI specific...
Maybe we just need a pm_disk_modes bitmap and a default_pm_disk_mode
member in struct pm_ops instead? What's firmware vs. platform anyway?
Thanks,
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: suspend to disk modes, default mode
2007-03-20 0:47 suspend to disk modes, default mode Johannes Berg
@ 2007-03-20 0:51 ` Johannes Berg
2007-03-20 1:03 ` Johannes Berg
2007-03-20 9:33 ` Pavel Machek
2 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2007-03-20 0:51 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-pm, Pavel Machek
[-- Attachment #1.1: Type: text/plain, Size: 455 bytes --]
On Tue, 2007-03-20 at 01:47 +0100, Johannes Berg wrote:
> This suspend to disk modes stuff really sucks. The last time I looked
> must have been a long time ago because then shutdown was default. Now I
> find that in November 06 you changed it to be platform by default.
Besides, this also means that anyone not setting pm_ops->pm_disk_mode to
platform has a weird consistency issue: you can change to shutdown but
not back. Umm...
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: suspend to disk modes, default mode
2007-03-20 0:47 suspend to disk modes, default mode Johannes Berg
2007-03-20 0:51 ` Johannes Berg
@ 2007-03-20 1:03 ` Johannes Berg
2007-03-20 9:33 ` Pavel Machek
2 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2007-03-20 1:03 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-pm, Pavel Machek
[-- Attachment #1.1: Type: text/plain, Size: 184 bytes --]
On Tue, 2007-03-20 at 01:47 +0100, Johannes Berg wrote:
> I also used to think this was for implementing suspend-to-both, is that
> wrong?
Yup, this must be wrong.
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: suspend to disk modes, default mode
2007-03-20 0:47 suspend to disk modes, default mode Johannes Berg
2007-03-20 0:51 ` Johannes Berg
2007-03-20 1:03 ` Johannes Berg
@ 2007-03-20 9:33 ` Pavel Machek
2007-03-20 9:44 ` Johannes Berg
2 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2007-03-20 9:33 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-pm
Hi!
> This suspend to disk modes stuff really sucks. The last time I looked
> must have been a long time ago because then shutdown was default. Now I
> find that in November 06 you changed it to be platform by default.
>
> The problem with this is that not all platforms support the "platform"
> mode.
>
> I have a pm_ops struct for PMU-based Apple powerpc machines that doesn't
> set pm_disk_mode in order not to allow the platform mode because that
> currently fails.
>
> I also used to think this was for implementing suspend-to-both, is that
> wrong? In any case, I can't live with it being platform by default
No, it is to get ACPI working after resume.
> Maybe we just need a pm_disk_modes bitmap and a default_pm_disk_mode
> member in struct pm_ops instead? What's firmware vs. platform anyway?
bitmap would be nice. Firmware used to mean "let the bios do the whole
suspend", platform means "linux does the suspend, but we tell bios we
are doing it", shutdown means "linux does the suspend, does not tell
anyone".
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: suspend to disk modes, default mode
2007-03-20 9:33 ` Pavel Machek
@ 2007-03-20 9:44 ` Johannes Berg
2007-03-20 10:20 ` Pavel Machek
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2007-03-20 9:44 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-pm
[-- Attachment #1.1: Type: text/plain, Size: 1016 bytes --]
Hi,
> > I also used to think this was for implementing suspend-to-both, is that
> > wrong? In any case, I can't live with it being platform by default
>
> No, it is to get ACPI working after resume.
Yeah, I noticed later on. Sorry for the misunderstanding.
> > Maybe we just need a pm_disk_modes bitmap and a default_pm_disk_mode
> > member in struct pm_ops instead? What's firmware vs. platform anyway?
>
> bitmap would be nice. Firmware used to mean "let the bios do the whole
> suspend", platform means "linux does the suspend, but we tell bios we
> are doing it", shutdown means "linux does the suspend, does not tell
> anyone".
Well, actually, "let the bios do the whole suspend" should be
implemented by a new PM_SUSPEND_FIRMWAREDISK mode that can be used
instead of "disk" and is invoked through pm_ops directly w/o hitting the
disk.c code. That would be the right way to invoke such a mode, however,
currently, no platforms even have such a mode as far as I can tell.
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: suspend to disk modes, default mode
2007-03-20 9:44 ` Johannes Berg
@ 2007-03-20 10:20 ` Pavel Machek
0 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2007-03-20 10:20 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-pm
Hi!
> > > Maybe we just need a pm_disk_modes bitmap and a default_pm_disk_mode
> > > member in struct pm_ops instead? What's firmware vs. platform anyway?
> >
> > bitmap would be nice. Firmware used to mean "let the bios do the whole
> > suspend", platform means "linux does the suspend, but we tell bios we
> > are doing it", shutdown means "linux does the suspend, does not tell
> > anyone".
>
> Well, actually, "let the bios do the whole suspend" should be
> implemented by a new PM_SUSPEND_FIRMWAREDISK mode that can be used
> instead of "disk" and is invoked through pm_ops directly w/o hitting the
> disk.c code. That would be the right way to invoke such a mode, however,
> currently, no platforms even have such a mode as far as I can tell.
Yes, ignore that. (ACPI can do that in S4bios case. I used to have
machine where it actually worked. It is obscure corner case these days).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-20 10:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 0:47 suspend to disk modes, default mode Johannes Berg
2007-03-20 0:51 ` Johannes Berg
2007-03-20 1:03 ` Johannes Berg
2007-03-20 9:33 ` Pavel Machek
2007-03-20 9:44 ` Johannes Berg
2007-03-20 10:20 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox