aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorTobias Huschle <huschle@linux.ibm.com>2024-08-12 13:39:32 +0200
committerVasily Gorbik <gor@linux.ibm.com>2024-08-29 22:56:35 +0200
commit7e627f819302b8c22098b0575c35a3349c4e306f (patch)
tree9853e32026531b83e656400cd396b1818360fccc /arch/s390
parent9dd333e7afc4a4855f821a7be83733b8ef48d5ba (diff)
s390/topology: Add config option to switch to vertical during boot
By default, all systems on s390 start in horizontal cpu polarization. Selecting the new config option SCHED_TOPOLOGY_VERTICAL allows to build a kernel that switches to vertical polarization during boot. Acked-by: Heiko Carstens <hca@linux.ibm.com> Tested-by: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Tobias Huschle <huschle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig8
-rw-r--r--arch/s390/kernel/topology.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index abc7e1cc0e7c..2ee634bab222 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -513,6 +513,14 @@ config SCHED_TOPOLOGY
making when dealing with machines that have multi-threading,
multiple cores or multiple books.
+config SCHED_TOPOLOGY_VERTICAL
+ def_bool y
+ bool "Use vertical CPU polarization by default"
+ depends on SCHED_TOPOLOGY
+ help
+ Use vertical CPU polarization by default if available.
+ The default CPU polarization is horizontal.
+
source "kernel/Kconfig.hz"
config CERT_STORE
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 4bd0ee8eb1ab..58da6d1bae45 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -674,6 +674,8 @@ static int __init topology_init(void)
set_topology_timer();
else
topology_update_polarization_simple();
+ if (IS_ENABLED(CONFIG_SCHED_TOPOLOGY_VERTICAL))
+ set_polarization(1);
register_sysctl("s390", topology_ctl_table);
dev_root = bus_get_dev_root(&cpu_subsys);