From: Linus Torvalds <torvalds@osdl.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Pavel Machek <pavel@ucw.cz>,
David Brownell <david-b@pacbell.net>
Subject: Re: Totally broken PCI PM calls
Date: Sun, 10 Oct 2004 21:25:58 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0410102115410.3897@ppc970.osdl.org> (raw)
In-Reply-To: <16746.299.189583.506818@cargo.ozlabs.ibm.com>
On Mon, 11 Oct 2004, Paul Mackerras wrote:
>
> Maybe the real problem is that we are trying to use the device suspend
> functions for suspend-to-disk, when we don't really want to change the
> device's power state at all.
An acceptable solution is certainly to instead of passing down "go to D3",
just not do anything at all. HOWEVER, I doubt that is actually all that
good a solution either: devices quite possibly do want to save state
and/or set wake-on-events.
But I don't know. Somebody would need to go through the drivers and verify
that.
NOTE! I don't mind passing down "D3cold" (aka 4 - same as PM_SUSPEND_DISK)
in theory. The problem is that the very first machine I ever tested it on
clearly didn't like it and refused to suspend. Maybe I was unlucky, but
the point is, the real solution again requires people to _verify_ that.
See the pattern?
Which is why I suggested making it a separate type that is _not_ a normal
number. Exactly so that you cannot think it's a PCI state by mistake, when
clearly drivers _do_ think that. And force people to verify it.
You could do it with "sparse" and "bitwise" types too. Sparse will
complain if you use the type in an inappropriate manner. But the basic
issue remains: there are PCI power states, and there are "suspend" power
states, and they are different. And right now people _are_ confused about
them.
Arguing against that is futile. It's a fact.
I'm more than happy to learn that there are other alternatives to solving
the confusion problem. But quite frankly, arguing for undoing the
translation is just stupid. It's putting your head in the sand and saying
"la-la-laa-I-can't-hear-you".
And until something actually tries to sort _out_ the confusion, the state
translation stays. Does it put devices into sleep modes when you shouldn't
need to? Sure. But at least it's not confused about things.
Linus
next prev parent reply other threads:[~2004-10-11 4:26 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-11 0:45 Totally broken PCI PM calls Benjamin Herrenschmidt
2004-10-11 2:41 ` Linus Torvalds
2004-10-11 3:42 ` Paul Mackerras
2004-10-11 4:04 ` Linus Torvalds
2004-10-11 4:24 ` Paul Mackerras
2004-10-11 9:57 ` Pavel Machek
2004-10-11 14:42 ` Linus Torvalds
2004-10-11 14:56 ` suspend-to-RAM [was Re: Totally broken PCI PM calls] Pavel Machek
2004-10-11 15:30 ` Linus Torvalds
2004-10-11 17:39 ` Olivier Galibert
2004-10-11 18:21 ` Pavel Machek
2004-10-11 15:53 ` Brice Goglin
2004-10-11 16:17 ` Pavel Machek
2004-10-11 17:09 ` Brice Goglin
2004-10-11 18:23 ` Pavel Machek
2004-10-11 18:40 ` Brice Goglin
2004-10-11 16:47 ` Totally broken PCI PM calls David Brownell
2004-10-11 22:28 ` Benjamin Herrenschmidt
2004-10-11 22:58 ` Dmitry Torokhov
2004-10-11 23:08 ` Benjamin Herrenschmidt
2004-10-12 3:00 ` David Brownell
2004-10-12 4:09 ` Dmitry Torokhov
2004-10-12 16:56 ` David Brownell
2004-10-12 9:27 ` Russell King
2004-10-12 11:24 ` Benjamin Herrenschmidt
2004-10-11 4:25 ` Linus Torvalds [this message]
2004-10-11 10:18 ` Pavel Machek
2004-10-11 10:54 ` Benjamin Herrenschmidt
2004-10-11 16:01 ` Linus Torvalds
2004-10-15 13:59 ` Pavel Machek
2004-10-15 15:56 ` Linus Torvalds
2004-10-24 20:58 ` Pavel Machek
2004-10-24 21:18 ` Linus Torvalds
2004-10-11 16:36 ` David Brownell
2004-10-11 21:17 ` Nigel Cunningham
2004-10-11 21:37 ` David Brownell
2004-10-11 22:12 ` Stefan Seyfried
2004-10-12 2:59 ` David Brownell
2004-10-12 8:54 ` Pavel Machek
2004-10-12 10:32 ` Stefan Seyfried
2004-10-12 18:28 ` David Brownell
2004-10-12 20:28 ` Stefan Seyfried
2004-10-13 13:34 ` David Brownell
2004-10-12 1:24 ` Nigel Cunningham
2004-10-12 8:53 ` Pavel Machek
2004-10-12 18:52 ` David Brownell
2004-10-12 19:50 ` Pavel Machek
2004-10-12 22:13 ` Benjamin Herrenschmidt
2004-10-12 22:35 ` David Brownell
2004-10-11 22:26 ` Benjamin Herrenschmidt
2004-10-11 3:45 ` Benjamin Herrenschmidt
2004-10-11 4:08 ` Linus Torvalds
2004-10-11 4:23 ` Benjamin Herrenschmidt
2004-10-11 4:32 ` Linus Torvalds
2004-10-11 4:55 ` Benjamin Herrenschmidt
2004-10-11 16:15 ` David Brownell
2004-10-11 22:22 ` Benjamin Herrenschmidt
2004-10-12 2:46 ` David Brownell
2004-10-12 4:02 ` Benjamin Herrenschmidt
2004-10-12 10:49 ` Nigel Cunningham
2004-10-12 11:27 ` Benjamin Herrenschmidt
2004-10-12 11:38 ` Nigel Cunningham
2004-10-12 11:51 ` Pavel Machek
2004-10-11 10:08 ` Pavel Machek
2004-10-11 9:51 ` Pavel Machek
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=Pine.LNX.4.58.0410102115410.3897@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=pavel@ucw.cz \
/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;
as well as URLs for NNTP newsgroup(s).