]> git.itanic.dy.fi Git - linux-stable/commit
powerpc/pseries/mobility: refactor node lookup during DT update
authorNathan Lynch <nathanl@linux.ibm.com>
Mon, 7 Dec 2020 21:52:00 +0000 (15:52 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Dec 2020 10:41:03 +0000 (21:41 +1100)
commit2efd7f6eb9b7107e469837d8452e750d7d080a5d
tree32275d1c5378f91a8346651b22c1bdb490186b56
parent87b57ea7e109520d3c6dfb01671a0cb134d3ccff
powerpc/pseries/mobility: refactor node lookup during DT update

In pseries_devicetree_update(), with each call to ibm,update-nodes the
partition firmware communicates the node to be deleted or updated by
placing its phandle in the work buffer. Each of delete_dt_node(),
update_dt_node(), and add_dt_node() have duplicate lookups using the
phandle value and corresponding refcount management.

Move the lookup and of_node_put() into pseries_devicetree_update(),
and emit a warning on any failed lookups.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201207215200.1785968-29-nathanl@linux.ibm.com
arch/powerpc/platforms/pseries/mobility.c