smt.h 415 B

1234567891011121314151617181920
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_SCHED_SMT_H
  3. #define _LINUX_SCHED_SMT_H
  4. #include <linux/static_key.h>
  5. #ifdef CONFIG_SCHED_SMT
  6. extern struct static_key_false sched_smt_present;
  7. static __always_inline bool sched_smt_active(void)
  8. {
  9. return static_branch_likely(&sched_smt_present);
  10. }
  11. #else
  12. static inline bool sched_smt_active(void) { return false; }
  13. #endif
  14. void arch_smt_update(void);
  15. #endif