]> www.infradead.org Git - linux.git/commitdiff
cpu/hotplug: Make HOTPLUG_PARALLEL independent of HOTPLUG_SMT
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 16 Jul 2024 14:14:58 +0000 (22:14 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 2 Aug 2024 14:06:36 +0000 (16:06 +0200)
Provide stub functions for SMT related parallel bring up functions so that
HOTPLUG_PARALLEL can work without HOTPLUG_SMT.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240716-loongarch-hotplug-v3-1-af59b3bb35c8@flygoat.com
kernel/cpu.c

index 1209ddaec026da7f8f27dcde18b526048ddc87a7..c89e0e91379a9fc157b4a64e7af6c421730cc27d 100644 (file)
@@ -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