From: Tobias Huschle Date: Mon, 12 Aug 2024 11:39:32 +0000 (+0200) Subject: s390/topology: Add config option to switch to vertical during boot X-Git-Tag: v6.12-rc1~113^2~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e627f819302b8c22098b0575c35a3349c4e306f;p=thirdparty%2Fkernel%2Flinux.git 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 Tested-by: Mete Durlu Signed-off-by: Tobias Huschle Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index abc7e1cc0e7c3..2ee634bab222d 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 4bd0ee8eb1ab5..58da6d1bae45b 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);