diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2021-03-23 17:50:56 -0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-03-29 13:22:18 +1100 |
commit | d19b3ad02c2d1a9a697b7059e32fa2d97a420b15 (patch) | |
tree | ca4977c1ed45e6db778e6fee0a81a056338e2d41 /arch/arm/mach-mvebu/mvebu-soc-id.c | |
parent | dfc4ae3372182a168146745def03d877f31fcf2f (diff) |
powerpc/pseries/hotplug-cpu: Show 'last online CPU' error in dlpar_cpu_offline()
One of the reasons that dlpar_cpu_offline can fail is when attempting to
offline the last online CPU of the kernel. This can be observed in a
pseries QEMU guest that has hotplugged CPUs. If the user offlines all
other CPUs of the guest, and a hotplugged CPU is now the last online
CPU, trying to reclaim it will fail.
The current error message in this situation returns rc with -EBUSY and a
generic explanation, e.g.:
pseries-hotplug-cpu: Failed to offline CPU PowerPC,POWER9, rc: -16
EBUSY can be caused by other conditions, such as cpu_hotplug_disable
being true. Throwing a more specific error message for this case,
instead of just "Failed to offline CPU", makes it clearer that the error
is in fact a known error situation instead of other generic/unknown
cause.
This patch adds a 'last online' check in dlpar_cpu_offline() to catch
the 'last online CPU' offline error, eturning a more informative error
message:
pseries-hotplug-cpu: Unable to remove last online CPU PowerPC,POWER9
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210323205056.52768-2-danielhb413@gmail.com
Diffstat (limited to 'arch/arm/mach-mvebu/mvebu-soc-id.c')
0 files changed, 0 insertions, 0 deletions