Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303641 > unrolled thread

Re: [RFD] Functional dependencies between devices

Started byTomeu Vizoso <tomeu.vizoso@collabora.com>
First post2016-01-07 16:00 +0100
Last post2016-01-08 16:20 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFD] Functional dependencies between devices Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2016-01-07 16:00 +0100
    Re: [RFD] Functional dependencies between devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-07 22:30 +0100
      Re: [RFD] Functional dependencies between devices Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2016-01-08 08:30 +0100
        Re: [RFD] Functional dependencies between devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-08 16:20 +0100

#1303641 — Re: [RFD] Functional dependencies between devices

FromTomeu Vizoso <tomeu.vizoso@collabora.com>
Date2016-01-07 16:00 +0100
SubjectRe: [RFD] Functional dependencies between devices
Message-ID<qOkcH-137-35@gated-at.bofh.it>
On 30 October 2015 at 23:52, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Tue, Oct 27, 2015 at 04:24:14PM +0100, Rafael J. Wysocki wrote:
>> My idea is to represent a supplier-consumer dependency between devices (or
>> more precisely between device+driver combos) as a "link" object containing
>> pointers to the devices in question, a list node for each of them and some
>> additional information related to the management of those objects, ie.
>> something like:
>>
>> struct device_link {
>>       struct device *supplier;
>>       struct list_head supplier_node;
>>       struct device *consumer;
>>       struct list_head consumer_node;
>>       <flags, status etc>
>> };
>>
>> In general, there will be two lists of those things per device, one list
>> of links to consumers and one list of links to suppliers.
>>
>> In that picture, links will be created by calling, say:
>>
>> int device_add_link(struct device *me, struct device *my_supplier, unsigned int flags);
>
> At first glance, I like this, nice.  Now to see how well it can be
> implemented :)

Hi Greg,

what's your opinion on using this to order device probes so we don't
try to probe a device that we know it has unfulfilled dependencies?

Regards,

Tomeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1303921

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-01-07 22:30 +0100
Message-ID<qOqi6-5nl-3@gated-at.bofh.it>
In reply to#1303641
On Thu, Jan 07, 2016 at 03:55:43PM +0100, Tomeu Vizoso wrote:
> On 30 October 2015 at 23:52, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Tue, Oct 27, 2015 at 04:24:14PM +0100, Rafael J. Wysocki wrote:
> >> My idea is to represent a supplier-consumer dependency between devices (or
> >> more precisely between device+driver combos) as a "link" object containing
> >> pointers to the devices in question, a list node for each of them and some
> >> additional information related to the management of those objects, ie.
> >> something like:
> >>
> >> struct device_link {
> >>       struct device *supplier;
> >>       struct list_head supplier_node;
> >>       struct device *consumer;
> >>       struct list_head consumer_node;
> >>       <flags, status etc>
> >> };
> >>
> >> In general, there will be two lists of those things per device, one list
> >> of links to consumers and one list of links to suppliers.
> >>
> >> In that picture, links will be created by calling, say:
> >>
> >> int device_add_link(struct device *me, struct device *my_supplier, unsigned int flags);
> >
> > At first glance, I like this, nice.  Now to see how well it can be
> > implemented :)
> 
> Hi Greg,
> 
> what's your opinion on using this to order device probes so we don't
> try to probe a device that we know it has unfulfilled dependencies?

Why would that matter, unless you can prove it's faster, I wouldn't
bother.

greg k-h

[toc] | [prev] | [next] | [standalone]


#1304234

FromTomeu Vizoso <tomeu.vizoso@collabora.com>
Date2016-01-08 08:30 +0100
Message-ID<qOzEL-3rg-27@gated-at.bofh.it>
In reply to#1303921
On 7 January 2016 at 22:29, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Jan 07, 2016 at 03:55:43PM +0100, Tomeu Vizoso wrote:
>> On 30 October 2015 at 23:52, Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> > On Tue, Oct 27, 2015 at 04:24:14PM +0100, Rafael J. Wysocki wrote:
>> >> My idea is to represent a supplier-consumer dependency between devices (or
>> >> more precisely between device+driver combos) as a "link" object containing
>> >> pointers to the devices in question, a list node for each of them and some
>> >> additional information related to the management of those objects, ie.
>> >> something like:
>> >>
>> >> struct device_link {
>> >>       struct device *supplier;
>> >>       struct list_head supplier_node;
>> >>       struct device *consumer;
>> >>       struct list_head consumer_node;
>> >>       <flags, status etc>
>> >> };
>> >>
>> >> In general, there will be two lists of those things per device, one list
>> >> of links to consumers and one list of links to suppliers.
>> >>
>> >> In that picture, links will be created by calling, say:
>> >>
>> >> int device_add_link(struct device *me, struct device *my_supplier, unsigned int flags);
>> >
>> > At first glance, I like this, nice.  Now to see how well it can be
>> > implemented :)
>>
>> Hi Greg,
>>
>> what's your opinion on using this to order device probes so we don't
>> try to probe a device that we know it has unfulfilled dependencies?
>
> Why would that matter, unless you can prove it's faster, I wouldn't
> bother.

I gave you the bootlog you asked in the post below, could you please
comment there?

https://lkml.kernel.org/g/562A280A.3040002@collabora.com

Thanks,

Tomeu

[toc] | [prev] | [next] | [standalone]


#1304646

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-01-08 16:20 +0100
Message-ID<qOGZA-8vi-19@gated-at.bofh.it>
In reply to#1304234
On Fri, Jan 08, 2016 at 08:28:15AM +0100, Tomeu Vizoso wrote:
> On 7 January 2016 at 22:29, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Thu, Jan 07, 2016 at 03:55:43PM +0100, Tomeu Vizoso wrote:
> >> On 30 October 2015 at 23:52, Greg Kroah-Hartman
> >> <gregkh@linuxfoundation.org> wrote:
> >> > On Tue, Oct 27, 2015 at 04:24:14PM +0100, Rafael J. Wysocki wrote:
> >> >> My idea is to represent a supplier-consumer dependency between devices (or
> >> >> more precisely between device+driver combos) as a "link" object containing
> >> >> pointers to the devices in question, a list node for each of them and some
> >> >> additional information related to the management of those objects, ie.
> >> >> something like:
> >> >>
> >> >> struct device_link {
> >> >>       struct device *supplier;
> >> >>       struct list_head supplier_node;
> >> >>       struct device *consumer;
> >> >>       struct list_head consumer_node;
> >> >>       <flags, status etc>
> >> >> };
> >> >>
> >> >> In general, there will be two lists of those things per device, one list
> >> >> of links to consumers and one list of links to suppliers.
> >> >>
> >> >> In that picture, links will be created by calling, say:
> >> >>
> >> >> int device_add_link(struct device *me, struct device *my_supplier, unsigned int flags);
> >> >
> >> > At first glance, I like this, nice.  Now to see how well it can be
> >> > implemented :)
> >>
> >> Hi Greg,
> >>
> >> what's your opinion on using this to order device probes so we don't
> >> try to probe a device that we know it has unfulfilled dependencies?
> >
> > Why would that matter, unless you can prove it's faster, I wouldn't
> > bother.
> 
> I gave you the bootlog you asked in the post below, could you please
> comment there?
> 
> https://lkml.kernel.org/g/562A280A.3040002@collabora.com

that made no sense at all...

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web