From: Russell King <rmk@arm.linux.org.uk>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Patrick Mochel <mochel@osdl.org>, Greg KH <greg@kroah.com>,
linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: PCI PM & compatibility
Date: Sat, 23 Aug 2003 18:48:19 +0100 [thread overview]
Message-ID: <20030823184819.B1158@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1061659704.769.8.camel@gaston>; from benh@kernel.crashing.org on Sat, Aug 23, 2003 at 07:28:25PM +0200
On Sat, Aug 23, 2003 at 07:28:25PM +0200, Benjamin Herrenschmidt wrote:
> On Sat, 2003-08-23 at 19:08, Russell King wrote:
> > On Sat, Aug 23, 2003 at 04:39:57PM +0200, Benjamin Herrenschmidt wrote:
> > > What about this patch to stay compatible with existing drivers
> > > implementing everything in save_state ?
> >
> > And why are we now suspending device parents before their siblings???
>
> I didn't notice that on the laptop here (because it's actually harmless
> on this specific machine), but if this is the case, then we are badly
> wrong indeed...
I think the problem is fairly fundamental to the way that we add
devices to the power lists.
When a device "A" is registered with the driver model, we call
device_add(). This adds the device to the bus, which calls any
registered driver methods. Once the device has been added to the
bus, we add the device to the tail of the device power list.
In the case where a device driver for device "A" registers further
devices, which are siblings of device "A", two things can happen:
- If a driver is already registered for the device, we call its
probe method before we have added device "A" to the power lists.
Therefore, the siblings will be added to the tail of the device
power list _before_ the device "A" has been added.
- If the driver registers after the device, the device "A" will be
added to the power list _before_ the siblings.
So in one case, we have PARENT SIBLING SIBLING SIBLING and in the
other case we have SIBLING SIBLING SIBLING PARENT.
Now, we do have this pm_users thing which seems to imply that it
describes the relationship between two devices. However, its non-
functional. It operates on a per-device variable called "pm_users"
which is only ever _written_ !
So, it looks like the new power model is currently half a solution...
Therefore, we need to do one of two things. Either revert Pat's
changes and return to a power model which for the most part works,
or the new power management model needs a serious work-over.
I stand by my earlier comments that it is too late to be doing this
type of development while we're supposed to be stabilising the kernel.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-08-23 17:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-23 14:39 PCI PM & compatibility Benjamin Herrenschmidt
2003-08-23 17:08 ` Russell King
2003-08-23 17:28 ` Benjamin Herrenschmidt
2003-08-23 17:48 ` Russell King [this message]
2003-08-26 15:31 ` Patrick Mochel
2003-08-26 17:51 ` Russell King
2003-08-27 22:57 ` Patrick Mochel
2003-08-28 21:45 ` Russell King
2003-08-27 12:43 ` Benjamin Herrenschmidt
2003-08-27 23:29 ` Patrick Mochel
2003-08-28 8:39 ` Benjamin Herrenschmidt
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=20030823184819.B1158@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=benh@kernel.crashing.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
/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).