]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:16:56 +0000 (14:16 +0200)
commitd5ee5a9e47f32626b6be3dec5710b342fca5c28b
tree50d295e6d6ee40c248af1f2116aaec434ad38d40
parent4dbe84b9b66cfe604f11d25a377c6ed1347ab6b3
powerpc/pseries/mobility: refactor node lookup during DT update

[ Upstream commit 2efd7f6eb9b7107e469837d8452e750d7d080a5d ]

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
Stable-dep-of: 319fa1a52e43 ("powerpc/pseries/mobility: ignore ibm, platform-facilities updates")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/pseries/mobility.c