]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: dynamically added OF nodes need to call of_node_init
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Thu, 10 Jul 2014 18:50:57 +0000 (14:50 -0400)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 22 Jul 2014 05:55:59 +0000 (15:55 +1000)
commitf469f6e7db8edd24c8366691845640a5415fe07b
tree79e57dbef093fc82b1e83f75c1216ee87d1f2df9
parent59fb1066cd63fbd918c2b3b7b223db0f85cc2a4e
powerpc/pseries: dynamically added OF nodes need to call of_node_init

Commit 67a0a39e1 refactored device tree nodes to use kobjects such that they
can be exposed via /sysfs. A secondary commit 6308d0bc6 furthered this rework
by moving the kobect initialization logic out of of_node_add into its own
of_node_init function. The inital commit removed the existing kref_init calls
in the pseries dlpar code with the assumption kobject initialization would
occur in of_node_add. The second commit had the side effect of triggering a
BUG_ON during DLPAR, migration and suspend/resume operations as a result of
dynamically added nodes being uninitialized.

This patch fixes this by adding of_node_init calls in place of the previously
removed kref_init calls.

Fixes: 6308d0bc69f4 ("of: device_node kobject lifecycle fixes")
Cc: stable@vger.kernel.org
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/dlpar.c
arch/powerpc/platforms/pseries/reconfig.c