cpu/SMT: Remove topology_smt_supported()
Since the maximum number of threads is now passed to cpu_smt_set_num_threads(), checking that value is enough to know whether SMT is supported. Suggested-by: Thomas Gleixner <tglx@linutronix.de> 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-6-ldufour@linux.ibm.com
This commit is contained in:
committed by
Thomas Gleixner
parent
447ae4ac41
commit
91b4a7dbfe
+2
-2
@@ -621,7 +621,7 @@ void __init cpu_smt_set_num_threads(unsigned int num_threads,
|
||||
{
|
||||
WARN_ON(!num_threads || (num_threads > max_threads));
|
||||
|
||||
if (!topology_smt_supported())
|
||||
if (max_threads == 1)
|
||||
cpu_smt_control = CPU_SMT_NOT_SUPPORTED;
|
||||
|
||||
cpu_smt_max_threads = max_threads;
|
||||
@@ -1801,7 +1801,7 @@ early_param("cpuhp.parallel", parallel_bringup_parse_param);
|
||||
|
||||
static inline bool cpuhp_smt_aware(void)
|
||||
{
|
||||
return topology_smt_supported();
|
||||
return cpu_smt_max_threads > 1;
|
||||
}
|
||||
|
||||
static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
|
||||
|
||||
Reference in New Issue
Block a user