summaryrefslogtreecommitdiff
path: root/kernel/sched/bfs_sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched/bfs_sched.h')
-rw-r--r--kernel/sched/bfs_sched.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/sched/bfs_sched.h b/kernel/sched/bfs_sched.h
index 5d97f7919..95bf4dc9e 100644
--- a/kernel/sched/bfs_sched.h
+++ b/kernel/sched/bfs_sched.h
@@ -127,6 +127,7 @@ static inline u64 rq_clock_task(struct rq *rq)
}
extern struct mutex sched_domains_mutex;
+extern struct static_key_false sched_schedstats;
#define rcu_dereference_check_sched_domain(p) \
rcu_dereference_check((p), \
@@ -142,6 +143,18 @@ extern struct mutex sched_domains_mutex;
#define for_each_domain(cpu, __sd) \
for (__sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd); __sd; __sd = __sd->parent)
+#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
+void register_sched_domain_sysctl(void);
+void unregister_sched_domain_sysctl(void);
+#else
+static inline void register_sched_domain_sysctl(void)
+{
+}
+static inline void unregister_sched_domain_sysctl(void)
+{
+}
+#endif
+
static inline void sched_ttwu_pending(void) { }
static inline int task_on_rq_queued(struct task_struct *p)
@@ -178,4 +191,21 @@ static inline struct cpuidle_state *idle_get_state(struct rq *rq)
return NULL;
}
#endif
+
+#ifdef CONFIG_CPU_FREQ
+DECLARE_PER_CPU(struct update_util_data *, cpufreq_update_util_data);
+
+static inline void cpufreq_trigger(u64 time)
+{
+ struct update_util_data *data;
+
+ data = rcu_dereference_sched(*this_cpu_ptr(&cpufreq_update_util_data));
+ if (data)
+ data->func(data, time, ULONG_MAX, 0);
+}
+#else
+static inline void cpufreq_trigger(u64 __maybe_unused time)
+{
+}
+#endif /* CONFIG_CPU_FREQ */
#endif /* BFS_SCHED_H */