File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change
1
+ /* 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
8
+ extern struct static_key_false sched_smt_present ;
9
+
10
+ static __always_inline bool sched_smt_active (void )
11
+ {
12
+ return static_branch_likely (& sched_smt_present );
13
+ }
14
+ #else
15
+ static inline bool sched_smt_active (void ) { return false; }
16
+ #endif
17
+
18
+ #endif
Original file line number Diff line number Diff line change 23
23
#include <linux/sched/prio.h>
24
24
#include <linux/sched/rt.h>
25
25
#include <linux/sched/signal.h>
26
+ #include <linux/sched/smt.h>
26
27
#include <linux/sched/stat.h>
27
28
#include <linux/sched/sysctl.h>
28
29
#include <linux/sched/task.h>
@@ -936,9 +937,6 @@ static inline int cpu_of(struct rq *rq)
936
937
937
938
938
939
#ifdef CONFIG_SCHED_SMT
939
-
940
- extern struct static_key_false sched_smt_present ;
941
-
942
940
extern void __update_idle_core (struct rq * rq );
943
941
944
942
static inline void update_idle_core (struct rq * rq )
You can’t perform that action at this time.
0 commit comments