powerpc/pseries: read the lpar name from the firmware
authorLaurent Dufour <ldufour@linux.ibm.com>
Thu, 6 Jan 2022 16:13:39 +0000 (17:13 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Feb 2022 09:32:10 +0000 (20:32 +1100)
commiteddaa9a402758d379520f6511fb61e89990698aa
treedb7d52c7fbc69111b9549aac62723292d8ebe78d
parentd5342fdd163ae0553a14820021a107e03eb1ea72
powerpc/pseries: read the lpar name from the firmware

The LPAR name may be changed after the LPAR has been started in the HMC.
In that case lparstat command is not reporting the updated value because
it reads it from the device tree which is read at boot time.

However this value could be read from RTAS.

Adding this value in the /proc/powerpc/lparcfg output allows to read the
updated value.

However the hypervisor, like Qemu/KVM, may not support this RTAS
parameter. In that case the value reported in lparcfg is read from the
device tree and so is not updated accordingly.

Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
[mpe: Drop doc-comment syntax, change RTAS/DT to lower case, use of_root
      to fix missing of_node_put(), use of_property_read_string()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220106161339.74656-1-ldufour@linux.ibm.com
arch/powerpc/platforms/pseries/lparcfg.c