summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSteve Muckle <smuckle@linaro.org>2016-11-11 14:04:43 -0800
committerAndres Oportus <andresoportus@google.com>2017-06-02 08:01:50 -0700
commitf02702dcf231c3258aabd702023286f6c01aaa21 (patch)
tree495ff802e3b238bcbe60bf25f0e509d95ac8182c /include/linux
parent5df19f969e4834548c4cf930c591581e237fccd0 (diff)
sched: backport cpufreq hooks from 4.9-rc4
The scheduler cpufreq hooks are required by the schedutil cpufreq governor. Change-Id: Ied6c46262bb33b7e81bbb3d3d2761124e0c676b7 Signed-off-by: Steve Muckle <smuckle@linaro.org> [trivial cherry-picking fixes] Signed-off-by: Juri Lelli <juri.lelli@arm.com> Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 79f70e5bae08..bc23d15244db 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -3291,4 +3291,21 @@ static inline unsigned long rlimit_max(unsigned int limit)
return task_rlimit_max(current, limit);
}
+#define SCHED_CPUFREQ_RT (1U << 0)
+#define SCHED_CPUFREQ_DL (1U << 1)
+#define SCHED_CPUFREQ_IOWAIT (1U << 2)
+
+#define SCHED_CPUFREQ_RT_DL (SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL)
+
+#ifdef CONFIG_CPU_FREQ
+struct update_util_data {
+ void (*func)(struct update_util_data *data, u64 time, unsigned int flags);
+};
+
+void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data,
+ void (*func)(struct update_util_data *data, u64 time,
+ unsigned int flags));
+void cpufreq_remove_update_util_hook(int cpu);
+#endif /* CONFIG_CPU_FREQ */
+
#endif