Skip to content

Commit 7a4dcb4

Browse files
ldu4KAGA-KOKO
authored andcommitted
cpu/hotplug: Remove dependancy against cpu_primary_thread_mask
The commit 18415f3 ("cpu/hotplug: Allow "parallel" bringup up to CPUHP_BP_KICK_AP_STATE") introduce a dependancy against a global variable cpu_primary_thread_mask exported by the X86 code. This variable is only used when CONFIG_HOTPLUG_PARALLEL is set. Since cpuhp_get_primary_thread_mask() and cpuhp_smt_aware() are only used when CONFIG_HOTPLUG_PARALLEL is set, don't define them when it is not set. No functional change. Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20230705145143.40545-2-ldufour@linux.ibm.com
1 parent 6eaae19 commit 7a4dcb4

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

kernel/cpu.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -650,22 +650,8 @@ bool cpu_smt_possible(void)
650650
}
651651
EXPORT_SYMBOL_GPL(cpu_smt_possible);
652652

653-
static inline bool cpuhp_smt_aware(void)
654-
{
655-
return topology_smt_supported();
656-
}
657-
658-
static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
659-
{
660-
return cpu_primary_thread_mask;
661-
}
662653
#else
663654
static inline bool cpu_smt_allowed(unsigned int cpu) { return true; }
664-
static inline bool cpuhp_smt_aware(void) { return false; }
665-
static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
666-
{
667-
return cpu_present_mask;
668-
}
669655
#endif
670656

671657
static inline enum cpuhp_state
@@ -1793,6 +1779,16 @@ static int __init parallel_bringup_parse_param(char *arg)
17931779
}
17941780
early_param("cpuhp.parallel", parallel_bringup_parse_param);
17951781

1782+
static inline bool cpuhp_smt_aware(void)
1783+
{
1784+
return topology_smt_supported();
1785+
}
1786+
1787+
static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
1788+
{
1789+
return cpu_primary_thread_mask;
1790+
}
1791+
17961792
/*
17971793
* On architectures which have enabled parallel bringup this invokes all BP
17981794
* prepare states for each of the to be onlined APs first. The last state

0 commit comments

Comments
 (0)