blob: 59d3736c454cf85a7de69181af6377fae7dc10c6 [file] [log] [blame]
Thomas Gleixner321a8742018-11-25 19:33:38 +01001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_SCHED_SMT_H
3#define _LINUX_SCHED_SMT_H
4
5#include <linux/static_key.h>
6
7#ifdef CONFIG_SCHED_SMT
8extern struct static_key_false sched_smt_present;
9
10static __always_inline bool sched_smt_active(void)
11{
12 return static_branch_likely(&sched_smt_present);
13}
14#else
15static inline bool sched_smt_active(void) { return false; }
16#endif
17
Thomas Gleixnera74cfff2018-11-25 19:33:39 +010018void arch_smt_update(void);
19
Thomas Gleixner321a8742018-11-25 19:33:38 +010020#endif