[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1110131413410.2026-100000@iolanthe.rowland.org>
Date: Thu, 13 Oct 2011 14:16:42 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Grant Likely <grant.likely@...retlab.ca>
cc: Ming Lei <tom.leiming@...il.com>,
Andrei Warkentin <awarkentin@...are.com>,
Greg KH <greg@...ah.com>, Dilan Lee <dilee@...dia.com>,
"G, Manjunath Kondaiah" <manjugk@...com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Josh Triplett <josh@...htriplett.org>, <Manjunath@...per.es>,
<linux-omap@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Linux PM List <linux-pm@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [PATCH 2/5] drivercore: Add driver probe deferral mechanism
On Thu, 13 Oct 2011, Grant Likely wrote:
> For the deferred case; here is an example of the additional
> constraint. Consider the following hierarchy:
>
> -A
> +-B
> | +-C
> | +-D
> |
> +-E
> +-F
> +-G
>
> dpm_list could be ordered in at least the following ways (depending on
> exactly when devices get registered). There are many permutation, but
> children are always be listed after its direct parent.
>
> 1) ABECDFG (breadth first)
> 2) AEBFGCD (breadth first)
> 3) ABCDEFG (depth first)
> 4) AEFGBCD (depth first)
>
> Now, assume that device B depends on device F, and also assume that
> there is no way either to express that in the hierarchy or even for
> the constraint to be known at device registration time (the is exactly
> the situation we're dealing with on embedded platforms). Only the
> driver for B knows that it needs a resource provided by F's driver.
> So, the situation becomes that the ordering of dpm_list must now also
> be sorted so that non-tree dependencies are also accounted for. Of
> the list above, only sort order 4 meets the new constraint.
>
> The question then becomes, how can the dpm_list get resorted
> dynamically at runtime to ensure that the new constraints are always
> met without breaking old ones. Here are some options I can think of:
This was a long message and I haven't absorbed the whole thing.
However it's worth pointing out right at the start that we already have
device_pm_move_before(), device_pm_move_after(), and
device_pm_move_last(). They are intended specifically to provide
drivers with a way of making sure that dpm_list is in the right order
-- people have been aware of these issues for some time.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists