]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita855b0af72b192258fe7bc8e0c194a0756ea2c80
treedb7d52c7fbc69111b9549aac62723292d8ebe78d
parent6ae59f8a9a3e22ccf77ab2a33f6250a5f846868d
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