|
18 | 18 | #include <linux/compiler.h> |
19 | 19 | #include <linux/cpumask.h> |
20 | 20 | #include <linux/cpuhotplug.h> |
| 21 | +#include <linux/cpu_smt.h> |
21 | 22 |
|
22 | 23 | struct device; |
23 | 24 | struct device_node; |
@@ -204,30 +205,6 @@ void cpuhp_report_idle_dead(void); |
204 | 205 | static inline void cpuhp_report_idle_dead(void) { } |
205 | 206 | #endif /* #ifdef CONFIG_HOTPLUG_CPU */ |
206 | 207 |
|
207 | | -enum cpuhp_smt_control { |
208 | | - CPU_SMT_ENABLED, |
209 | | - CPU_SMT_DISABLED, |
210 | | - CPU_SMT_FORCE_DISABLED, |
211 | | - CPU_SMT_NOT_SUPPORTED, |
212 | | - CPU_SMT_NOT_IMPLEMENTED, |
213 | | -}; |
214 | | - |
215 | | -#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT) |
216 | | -extern enum cpuhp_smt_control cpu_smt_control; |
217 | | -extern void cpu_smt_disable(bool force); |
218 | | -extern void cpu_smt_check_topology(void); |
219 | | -extern bool cpu_smt_possible(void); |
220 | | -extern int cpuhp_smt_enable(void); |
221 | | -extern int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval); |
222 | | -#else |
223 | | -# define cpu_smt_control (CPU_SMT_NOT_IMPLEMENTED) |
224 | | -static inline void cpu_smt_disable(bool force) { } |
225 | | -static inline void cpu_smt_check_topology(void) { } |
226 | | -static inline bool cpu_smt_possible(void) { return false; } |
227 | | -static inline int cpuhp_smt_enable(void) { return 0; } |
228 | | -static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; } |
229 | | -#endif |
230 | | - |
231 | 208 | extern bool cpu_mitigations_off(void); |
232 | 209 | extern bool cpu_mitigations_auto_nosmt(void); |
233 | 210 |
|
|
0 commit comments