Re: [RFD] Functional dependencies between devices

From: Rafael J. Wysocki
Date: Fri Oct 30 2015 - 21:44:21 EST


On Thursday, October 29, 2015 09:15:09 AM Mark Brown wrote:
> On Tue, Oct 27, 2015 at 04:24:14PM +0100, Rafael J. Wysocki wrote:
>
> > So, the question to everybody is whether or not this sounds reasonable or there
> > are concerns about it and if so what they are. At this point I mostly need to
> > know if I'm not overlooking anything fundamental at the general level.
>
> This seems like a good plan to me however I am concerned that only
> allowing links to be created at device registration time will prove
> restrictive - it means we're going to ignore anything we figure out
> later on in the boot sequence.

That's not the plan, though. :-)

I'm talking about device registration time or device probe time (for
dependencies that aren't known at the registration time).

> I would be very surprised if we didn't
> need that, either from things that get missed or from things that get
> allocated dynamically at runtime on systems with flexible hardware, and
> it'd also mean that systems can start to benefit from this for suspend
> and resume without needing the updates to the firmware parsing support.

The reason why I think it should be restricted to the probe/remove and
registration/unregistration times is because of PM. More specifically,
adding a link to a "supplier" causes additional actions to be taken during
PM operations (eg. if the supplier device is suspended at the consumer device
resume time, it needs to be resumed in the runtime PM case or waited for in
the system resume case) which may be regarded as a change in a way PM is
handled. Such changes are only expected to happen at the points I mentioned
and may lead to rather undesirable outcomes if made elsewhere.

Thanks,
Rafael

Attachment: signature.asc
Description: This is a digitally signed message part.