18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _LINUX_SCHED_SMT_H 38c2ecf20Sopenharmony_ci#define _LINUX_SCHED_SMT_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/static_key.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifdef CONFIG_SCHED_SMT 88c2ecf20Sopenharmony_ciextern struct static_key_false sched_smt_present; 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cistatic __always_inline bool sched_smt_active(void) 118c2ecf20Sopenharmony_ci{ 128c2ecf20Sopenharmony_ci return static_branch_likely(&sched_smt_present); 138c2ecf20Sopenharmony_ci} 148c2ecf20Sopenharmony_ci#else 158c2ecf20Sopenharmony_cistatic inline bool sched_smt_active(void) { return false; } 168c2ecf20Sopenharmony_ci#endif 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_civoid arch_smt_update(void); 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#endif 21