From: Pavel Machek <pavel@ucw.cz>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>,
Karol Kozimor <sziwan@hell.org.pl>,
Russell King <rmk@arm.linux.org.uk>
Subject: Re: Broken PM semantics (WAS: PATCH: Shutdown IDE before powering off).
Date: Thu, 18 Mar 2004 07:36:32 +0100 [thread overview]
Message-ID: <20040318063631.GA597@openzaurus.ucw.cz> (raw)
In-Reply-To: <1079146102.2302.60.camel@gaston>
Hi!
> > Thus wrote Bartlomiej Zolnierkiewicz:
> > >
> > > On Thursday 22 of January 2004 17:02, Jeff Garzik wrote:
> > > > I'm either shock or very very worried that the reboot notifier that
> > > > flushes IDE in 2.4.x, ide_notifier, is nowhere to be seen in 2.6.x :(
> > > > That seems like the real problem -- the code _used_ to be there.
> > >
> > > Yep, it should be re-added. I wonder when/why it was removed?
>
> Ideally, it should use the same mecanism as the PM requests...
>
> In fact, the shutdown is just a special case of PM request. I think
> ultimately, we should drop the various "shutdown()" functions in the
> drivers in favor of a "state" selector for PM. That goes along with
> the current problem of "state" in PM beeing completely bogus. The
> constants defined by linux/pm.h are in no way related to what
> the various drivers have come to expect.
>
> enum {
> PM_SUSPEND_ON,
> PM_SUSPEND_STANDBY,
> PM_SUSPEND_MEM,
> PM_SUSPEND_DISK,
> PM_SUSPEND_MAX,
> };
>
> Which basically gives is MEM=2 and DISK=3, while drivers usually
> expect MEM=3 and DISK=4 while nobody really cares about 2 except
> some specific stuffs in the arch code (or radeonfb on pmacs...)
>
> We should get rid of this assumption that we are passing a D-type
> anyway. I suggest we define once for all that what we are passing
> down the driver is really the overall system state we are getting
> to, that is MEM,DISK,KEXEC,SHUTDOWN, eventually STANDBY if we
> ever do something like that (useful for handhelds that have a
> special idle state and really don't care about scheduling whne
> nothing happens for a while).
Agreed. Or at least document that it takes D states
and BUG-ON on invalid values...
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
prev parent reply other threads:[~2004-03-25 14:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1gC8S-6UB-5@gated-at.bofh.it>
[not found] ` <1gIHq-3JU-23@gated-at.bofh.it>
[not found] ` <1gPzb-1OM-17@gated-at.bofh.it>
[not found] ` <1gQET-2Qn-9@gated-at.bofh.it>
2004-03-11 21:46 ` PATCH: Shutdown IDE before powering off Karol Kozimor
2004-03-13 2:48 ` Broken PM semantics (WAS: PATCH: Shutdown IDE before powering off) Benjamin Herrenschmidt
2004-03-18 6:36 ` Pavel Machek [this message]
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=20040318063631.GA597@openzaurus.ucw.cz \
--to=pavel@ucw.cz \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=sziwan@hell.org.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