]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Do all node initialization in dlpar_parse_cc_node
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Thu, 15 Aug 2013 05:23:49 +0000 (22:23 -0700)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 27 Aug 2013 04:45:13 +0000 (14:45 +1000)
commit1e8eef8eff749ad9ff23f8dcc14081b26b3bcf0c
treeed504537f69ea8657849f070728e25a631461b5c
parent8f08310b440b2b50c99965792c13cd2127fabca4
powerpc/pseries: Do all node initialization in dlpar_parse_cc_node

Currently the OF_DYNAMIC and kref initialization for a node happens in
dlpar_attach_node. However, a node passed to dlpar_attach_node may be a tree
containing child nodes, and no initialization traversal is done on the
tree. Since the children never get their kref initialized or the OF_DYNAMIC
flag set these nodes are prevented from ever being released from memory
should they become detached. This initialization step is better done at the
time each node is allocated in dlpar_parse_cc_node.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/dlpar.c