Skip to content

Commit c0e81a4

Browse files
FlyGoatKAGA-KOKO
authored andcommitted
cpu/hotplug: Make HOTPLUG_PARALLEL independent of HOTPLUG_SMT
Provide stub functions for SMT related parallel bring up functions so that HOTPLUG_PARALLEL can work without HOTPLUG_SMT. Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 8400291 commit c0e81a4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

kernel/cpu.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,7 @@ static int __init parallel_bringup_parse_param(char *arg)
18081808
}
18091809
early_param("cpuhp.parallel", parallel_bringup_parse_param);
18101810

1811+
#ifdef CONFIG_HOTPLUG_SMT
18111812
static inline bool cpuhp_smt_aware(void)
18121813
{
18131814
return cpu_smt_max_threads > 1;
@@ -1817,6 +1818,16 @@ static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
18171818
{
18181819
return cpu_primary_thread_mask;
18191820
}
1821+
#else
1822+
static inline bool cpuhp_smt_aware(void)
1823+
{
1824+
return false;
1825+
}
1826+
static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
1827+
{
1828+
return cpu_none_mask;
1829+
}
1830+
#endif
18201831

18211832
/*
18221833
* On architectures which have enabled parallel bringup this invokes all BP

0 commit comments

Comments
 (0)