powerpc: export the CPU node count
authorLaurent Dufour <ldufour@linux.ibm.com>
Thu, 10 Nov 2022 18:06:18 +0000 (19:06 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 7 Dec 2022 09:14:49 +0000 (20:14 +1100)
commite13d23a404f2e6dfaf8b1ef7d161a0836fce4fa5
tree0d093ffe5eee8a241016486c009de03282c92e04
parent5ddcc03a07ae1ab5062f89a946d9495f1fd8eaa4
powerpc: export the CPU node count

At boot time, the FDT is parsed to compute the number of CPUs.
In addition count the number of CPU nodes and export it.

This is useful when building the FDT for a kexeced kernel since we need to
take in account the CPU node added since the boot time during CPU hotplug
operations.

Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221110180619.15796-2-ldufour@linux.ibm.com
arch/powerpc/include/asm/prom.h
arch/powerpc/kernel/prom.c