summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-08-01 17:48:21 -0700
committerSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-08-22 14:06:33 -0700
commit9095a09ab1d2bd5b1ab123d4714003ee77aa4fa1 (patch)
treeeef0aca3e810aed3e36e149e033904c37afeed93 /include/linux/sched.h
parent7663fb1d6e7f417c1127f8010eddf080b4fc6a24 (diff)
sched: Move most HMP specific code to a separate file.
Most code pertaining to CONFIG_SCHED_HMP has been moved to a separate file "hmp.c" in order to facilitate kernel upgrades. Fewer changes in the original scheduler files means fewer conflicts. Some parts of code, however, could not be moved to the separate file either because of dependencies with other non-HMP code or because the changes are specific only to the scheduling classes where the code resides. Change-Id: Ib067ac75e5a494008dcb3c67586b622c1b3962ce Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d7f67d0b9644..74b2a11b1d1c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2340,8 +2340,10 @@ struct sched_load {
extern int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle);
extern u32 sched_get_wake_up_idle(struct task_struct *p);
-extern int sched_set_group_id(struct task_struct *p, unsigned int group_id);
-extern unsigned int sched_get_group_id(struct task_struct *p);
+
+struct cpu_cycle_counter_cb {
+ u64 (*get_cpu_cycle_counter)(int cpu);
+};
#ifdef CONFIG_SCHED_HMP
extern int sched_set_window(u64 window_start, unsigned int window_size);
@@ -2363,8 +2365,23 @@ extern void sched_set_cpu_cstate(int cpu, int cstate,
int wakeup_energy, int wakeup_latency);
extern void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, int dstate,
int wakeup_energy, int wakeup_latency);
+extern int register_cpu_cycle_counter_cb(struct cpu_cycle_counter_cb *cb);
+extern u64 sched_ktime_clock(void);
+extern int sched_set_group_id(struct task_struct *p, unsigned int group_id);
+extern unsigned int sched_get_group_id(struct task_struct *p);
#else /* CONFIG_SCHED_HMP */
+static inline u64 sched_ktime_clock(void)
+{
+ return 0;
+}
+
+static inline int
+register_cpu_cycle_counter_cb(struct cpu_cycle_counter_cb *cb)
+{
+ return 0;
+}
+
static inline int sched_set_window(u64 window_start, unsigned int window_size)
{
return -EINVAL;
@@ -2435,8 +2452,6 @@ extern u64 local_clock(void);
extern u64 running_clock(void);
extern u64 sched_clock_cpu(int cpu);
-extern u64 sched_ktime_clock(void);
-
extern void sched_clock_init(void);
extern int sched_clock_initialized(void);
@@ -3373,9 +3388,4 @@ static inline unsigned long rlimit_max(unsigned int limit)
return task_rlimit_max(current, limit);
}
-struct cpu_cycle_counter_cb {
- u64 (*get_cpu_cycle_counter)(int cpu);
-};
-int register_cpu_cycle_counter_cb(struct cpu_cycle_counter_cb *cb);
-
#endif