File tree Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ static inline int topology_max_smt_threads(void)
141
141
int topology_update_package_map (unsigned int apicid , unsigned int cpu );
142
142
int topology_update_die_map (unsigned int dieid , unsigned int cpu );
143
143
int topology_phys_to_logical_pkg (unsigned int pkg );
144
- bool topology_smt_supported (void );
145
144
146
145
extern struct cpumask __cpu_primary_thread_mask ;
147
146
#define cpu_primary_thread_mask ((const struct cpumask *)&__cpu_primary_thread_mask)
@@ -164,7 +163,6 @@ static inline int topology_phys_to_logical_pkg(unsigned int pkg) { return 0; }
164
163
static inline int topology_max_die_per_package (void ) { return 1 ; }
165
164
static inline int topology_max_smt_threads (void ) { return 1 ; }
166
165
static inline bool topology_is_primary_thread (unsigned int cpu ) { return true; }
167
- static inline bool topology_smt_supported (void ) { return false; }
168
166
#endif /* !CONFIG_SMP */
169
167
170
168
static inline void arch_fix_phys_package_id (int num , u32 slot )
Original file line number Diff line number Diff line change @@ -326,14 +326,6 @@ static void notrace start_secondary(void *unused)
326
326
cpu_startup_entry (CPUHP_AP_ONLINE_IDLE );
327
327
}
328
328
329
- /**
330
- * topology_smt_supported - Check whether SMT is supported by the CPUs
331
- */
332
- bool topology_smt_supported (void )
333
- {
334
- return smp_num_siblings > 1 ;
335
- }
336
-
337
329
/**
338
330
* topology_phys_to_logical_pkg - Map a physical package id to a logical
339
331
* @phys_pkg: The physical package id to map
Original file line number Diff line number Diff line change @@ -621,7 +621,7 @@ void __init cpu_smt_set_num_threads(unsigned int num_threads,
621
621
{
622
622
WARN_ON (!num_threads || (num_threads > max_threads ));
623
623
624
- if (! topology_smt_supported () )
624
+ if (max_threads == 1 )
625
625
cpu_smt_control = CPU_SMT_NOT_SUPPORTED ;
626
626
627
627
cpu_smt_max_threads = max_threads ;
@@ -1801,7 +1801,7 @@ early_param("cpuhp.parallel", parallel_bringup_parse_param);
1801
1801
1802
1802
static inline bool cpuhp_smt_aware (void )
1803
1803
{
1804
- return topology_smt_supported () ;
1804
+ return cpu_smt_max_threads > 1 ;
1805
1805
}
1806
1806
1807
1807
static inline const struct cpumask * cpuhp_get_primary_thread_mask (void )
You can’t perform that action at this time.
0 commit comments