From: Tyrel Datwyler <turtle.in.the.kernel@gmail.com>
To: Grant Likely <grant.likely@linaro.org>,
Nathan Fontenot <nfont@austin.ibm.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: OF_DYNAMIC node lifecycle
Date: Wed, 16 Jul 2014 11:30:22 -0700 [thread overview]
Message-ID: <53C6C4BE.6010301@gmail.com> (raw)
In-Reply-To: <CACxGe6u5bVwYZjux9F2xzZSxZOSe37DGemCgcYtmiTP-xenQfg@mail.gmail.com>
On 07/15/2014 10:33 PM, Grant Likely wrote:
> I've got another question about powerpc reconfiguration. I was looking
> at the dlpar_configure_connector() function in dlpar.c. I see that the
> function has the ability to process multiple nodes with additional
> sibling and child nodes. It appears to link them into a detached tree
> structure, and the function returns a pointer to the first node.
>
> All of the callers of that function then call dlpar_attach_node(),
> which calls of_attach_node(). However, of_attach_node() only handles a
> single node. It doesn't handle siblings or children. Is this a bug?
> Does the configure connector ever actually receive more than one node
> at once?
Yes, it is sometimes the case we will get a tree structure back of more
than one node. Under the proc interface implementation this just worked.
With the move to sysfs it appears we have a regression here. What makes
more sense here, for us to walk the tree calling of_attach_node, or to
move such tree walking logic into of_attach_node? From what I can tell
we are the only consumers of of_attach_node.
-Tyrel
>
> g.
>
> On Fri, Jun 27, 2014 at 8:41 AM, Nathan Fontenot <nfont@austin.ibm.com> wrote:
>> On 06/27/2014 07:41 AM, Grant Likely wrote:
>>> On Thu, 26 Jun 2014 15:01:49 -0500, Nathan Fontenot <nfont@austin.ibm.com> wrote:
>>>> On 06/25/2014 03:24 PM, Grant Likely wrote:
>>>>> On Tue, 24 Jun 2014 15:10:55 -0500, Nathan Fontenot <nfont@austin.ibm.com> wrote:
>>>>>>>> heh! I have often thought about adding reference counting to device tree
>>>>>>>> properties.
>>>>>>>
>>>>>>> You horrible, horrible man.
>>>>>>
>>>>>> Yes. I are evil :)
>>>>>>
>>>>>> After looking again the work needed to add reference counts to properties
>>>>>> would be huge. The few properties I am concerned with are specific to powerpc
>>>>>> so perhaps just adding an arch specific lock around updating those
>>>>>> properties would work.
>>>>>
>>>>> Which code/properties? I'd like to have a look myself.
>>>>
>>>> /ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory
>>>>
>>>> The property is updated in
>>>> arch/powerpc/platforms/pseries/hotplug-memory.c:pseries_update_drconf_memory()
>>>
>>> Specifically, what do you need for the locking? Are you wanting to hold
>>> off additional changes while that function is executing? Pantelis is
>>> adding a mutex for device tree writers. Holding that mutex would prevent
>>> any changes from happening in the tree without affecting readers. Would
>>> that be sufficient?
>>
>> That would work.
>>
>> -Nathan
>>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
WARNING: multiple messages have this Message-ID (diff)
From: Tyrel Datwyler <turtle.in.the.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
Tyrel Datwyler
<tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
linuxppc-dev
<linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Subject: Re: OF_DYNAMIC node lifecycle
Date: Wed, 16 Jul 2014 11:30:22 -0700 [thread overview]
Message-ID: <53C6C4BE.6010301@gmail.com> (raw)
In-Reply-To: <CACxGe6u5bVwYZjux9F2xzZSxZOSe37DGemCgcYtmiTP-xenQfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 07/15/2014 10:33 PM, Grant Likely wrote:
> I've got another question about powerpc reconfiguration. I was looking
> at the dlpar_configure_connector() function in dlpar.c. I see that the
> function has the ability to process multiple nodes with additional
> sibling and child nodes. It appears to link them into a detached tree
> structure, and the function returns a pointer to the first node.
>
> All of the callers of that function then call dlpar_attach_node(),
> which calls of_attach_node(). However, of_attach_node() only handles a
> single node. It doesn't handle siblings or children. Is this a bug?
> Does the configure connector ever actually receive more than one node
> at once?
Yes, it is sometimes the case we will get a tree structure back of more
than one node. Under the proc interface implementation this just worked.
With the move to sysfs it appears we have a regression here. What makes
more sense here, for us to walk the tree calling of_attach_node, or to
move such tree walking logic into of_attach_node? From what I can tell
we are the only consumers of of_attach_node.
-Tyrel
>
> g.
>
> On Fri, Jun 27, 2014 at 8:41 AM, Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> wrote:
>> On 06/27/2014 07:41 AM, Grant Likely wrote:
>>> On Thu, 26 Jun 2014 15:01:49 -0500, Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> wrote:
>>>> On 06/25/2014 03:24 PM, Grant Likely wrote:
>>>>> On Tue, 24 Jun 2014 15:10:55 -0500, Nathan Fontenot <nfont-V7BBcbaFuwjMbYB6QlFGEg@public.gmane.org> wrote:
>>>>>>>> heh! I have often thought about adding reference counting to device tree
>>>>>>>> properties.
>>>>>>>
>>>>>>> You horrible, horrible man.
>>>>>>
>>>>>> Yes. I are evil :)
>>>>>>
>>>>>> After looking again the work needed to add reference counts to properties
>>>>>> would be huge. The few properties I am concerned with are specific to powerpc
>>>>>> so perhaps just adding an arch specific lock around updating those
>>>>>> properties would work.
>>>>>
>>>>> Which code/properties? I'd like to have a look myself.
>>>>
>>>> /ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory
>>>>
>>>> The property is updated in
>>>> arch/powerpc/platforms/pseries/hotplug-memory.c:pseries_update_drconf_memory()
>>>
>>> Specifically, what do you need for the locking? Are you wanting to hold
>>> off additional changes while that function is executing? Pantelis is
>>> adding a mutex for device tree writers. Holding that mutex would prevent
>>> any changes from happening in the tree without affecting readers. Would
>>> that be sufficient?
>>
>> That would work.
>>
>> -Nathan
>>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-16 18:30 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 20:07 OF_DYNAMIC node lifecycle Grant Likely
2014-06-18 20:07 ` Grant Likely
2014-06-19 8:33 ` Pantelis Antoniou
2014-06-19 8:33 ` Pantelis Antoniou
2014-06-23 14:58 ` Grant Likely
2014-06-23 14:58 ` Grant Likely
2014-06-23 15:26 ` Pantelis Antoniou
2014-06-23 15:26 ` Pantelis Antoniou
2014-06-23 20:21 ` Grant Likely
2014-06-23 20:21 ` Grant Likely
2014-06-24 20:07 ` Nathan Fontenot
2014-06-24 20:07 ` Nathan Fontenot
2014-06-25 20:22 ` Grant Likely
2014-06-25 20:22 ` Grant Likely
2014-06-26 19:59 ` Nathan Fontenot
2014-06-26 19:59 ` Nathan Fontenot
2014-06-27 12:32 ` Grant Likely
2014-06-27 12:32 ` Grant Likely
2014-06-27 12:40 ` Pantelis Antoniou
2014-06-27 12:40 ` Pantelis Antoniou
2014-06-27 14:41 ` Nathan Fontenot
2014-06-27 14:41 ` Nathan Fontenot
2014-06-19 15:26 ` Nathan Fontenot
2014-06-19 15:26 ` Nathan Fontenot
2014-06-23 14:48 ` Grant Likely
2014-06-23 14:48 ` Grant Likely
2014-06-24 20:10 ` Nathan Fontenot
2014-06-24 20:10 ` Nathan Fontenot
2014-06-25 20:24 ` Grant Likely
2014-06-25 20:24 ` Grant Likely
2014-06-26 20:01 ` Nathan Fontenot
2014-06-26 20:01 ` Nathan Fontenot
2014-06-27 12:41 ` Grant Likely
2014-06-27 12:41 ` Grant Likely
2014-06-27 14:41 ` Nathan Fontenot
2014-06-27 14:41 ` Nathan Fontenot
2014-07-16 5:33 ` Grant Likely
2014-07-16 5:33 ` Grant Likely
2014-07-16 18:30 ` Tyrel Datwyler [this message]
2014-07-16 18:30 ` Tyrel Datwyler
2014-07-16 20:57 ` Grant Likely
2014-07-16 20:57 ` Grant Likely
2014-07-16 22:26 ` Grant Likely
2014-07-16 22:26 ` Grant Likely
2014-07-16 23:12 ` Nathan Fontenot
2014-07-16 23:12 ` Nathan Fontenot
2014-07-17 0:44 ` Grant Likely
2014-07-17 0:44 ` Grant Likely
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=53C6C4BE.6010301@gmail.com \
--to=turtle.in.the.kernel@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=nfont@austin.ibm.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=tyreld@linux.vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.