Thread (1 message) 1 message, 1 author, 2014-07-16

Re: OF_DYNAMIC node lifecycle

From: Grant Likely <hidden>
Date: 2014-07-16 05:33:20
Also in: linux-devicetree

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?

g.

On Fri, Jun 27, 2014 at 8:41 AM, Nathan Fontenot [off-list ref] wrote:
On 06/27/2014 07:41 AM, Grant Likely wrote:
quoted
On Thu, 26 Jun 2014 15:01:49 -0500, Nathan Fontenot [off-list ref] wrote:
quoted
On 06/25/2014 03:24 PM, Grant Likely wrote:
quoted
On Tue, 24 Jun 2014 15:10:55 -0500, Nathan Fontenot [off-list ref] wrote:
quoted
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help