powerpc/kexec_file: fix cpus node update to FDT
authorSourabh Jain <sourabhjain@linux.ibm.com>
Fri, 10 May 2024 10:22:35 +0000 (15:52 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 17 Jun 2024 12:48:45 +0000 (22:48 +1000)
commit932bed41217059638c78a75411b7893b121d2162
tree30b73a6a8bdf9426a280bf8ecd3dc03eac0d567d
parent0d3ff067331ef84e7e7f49537d768881042ed5ba
powerpc/kexec_file: fix cpus node update to FDT

While updating the cpus node, commit 40c753993e3a ("powerpc/kexec_file:
 Use current CPU info while setting up FDT") first deletes all subnodes
under the /cpus node. However, while adding sub-nodes back, it missed
adding cpus subnodes whose device_type != "cpu", such as l2-cache*,
l3-cache*, ibm,powerpc-cpu-features.

Fix this by only deleting cpus sub-nodes of device_type == "cpus" and
then adding all available nodes with device_type == "cpu".

Fixes: 40c753993e3a ("powerpc/kexec_file: Use current CPU info while setting up FDT")
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240510102235.2269496-3-sourabhjain@linux.ibm.com
arch/powerpc/kexec/core_64.c