s390/smp: Add support for HOTPLUG_SMT
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 27 Mar 2025 09:14:43 +0000 (10:14 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 31 Mar 2025 10:20:39 +0000 (12:20 +0200)
commit1018424ace7ed6dee9ddc36256162250017e4401
tree78f6e08e316a6a26ca8e9a5812bd22a7de44176e
parent991a20173a1fbafd9fc0df0c7e17bb62d44a4deb
s390/smp: Add support for HOTPLUG_SMT

Add support for HOTPLUG_SMT. With this the s390 specific "nosmt" kernel
command line parameter handling is replaced with common code handling.

This means that just specifying "nosmt" still enables smt from an
architectural point of view, however only the primary (base) cpu can be set
online. Enabling smt during runtime via /sys/devices/system/cpu/smt/control
allows to set secondary cpus online. This way "nosmt" works like on other
architectures where enabling and disabling smt during runtime is possible.

If "nosmt=force" is specified smt is also still enabled from an
architectural point of view, but there is no way to set secondary cpus
online during runtime, also like on other architectures.

In order to disable smt from architectural point of view, which was
previously achieved with the s390 specific "nosmt" command line option,
"smt=1" can be used.

Tested-by: Mete Durlu <meted@linux.ibm.com>
Reviewed-by: Mete Durlu <meted@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Documentation/admin-guide/kernel-parameters.txt
arch/s390/Kconfig
arch/s390/include/asm/topology.h
arch/s390/kernel/smp.c