lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240715-loongarch-hotplug-v2-1-7d18b3d46b11@flygoat.com>
Date: Mon, 15 Jul 2024 21:35:28 +0800
From: Jiaxun Yang <jiaxun.yang@...goat.com>
To: Thomas Gleixner <tglx@...utronix.de>, 
 Peter Zijlstra <peterz@...radead.org>, Huacai Chen <chenhuacai@...nel.org>, 
 WANG Xuerui <kernel@...0n.name>
Cc: linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev, 
 Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: [PATCH v2 1/3] cpu/hotplug: Make HOTPLUG_PARALLEL independent of
 HOTPLUG_SMT

Provide stub function for smt related parallel bring up functions
so that HOTPLUG_PARALLEL can work without HOTPLUG_PARALLEL.

Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
---
v2: Use stub function (tglx)
---
 kernel/cpu.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1209ddaec026..c89e0e91379a 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1808,6 +1808,7 @@ static int __init parallel_bringup_parse_param(char *arg)
 }
 early_param("cpuhp.parallel", parallel_bringup_parse_param);
 
+#ifdef CONFIG_HOTPLUG_SMT
 static inline bool cpuhp_smt_aware(void)
 {
 	return cpu_smt_max_threads > 1;
@@ -1817,6 +1818,16 @@ static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
 {
 	return cpu_primary_thread_mask;
 }
+#else
+static inline bool cpuhp_smt_aware(void)
+{
+	return false;
+}
+static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
+{
+	return cpu_none_mask;
+}
+#endif
 
 /*
  * On architectures which have enabled parallel bringup this invokes all BP

-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ