summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-07-28 11:22:08 -0700
committerSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-08-22 11:33:55 -0700
commite2b9b4a39560077bf20712564a8de920431f1c62 (patch)
treeca38c4c6c11ba659736dbcf99959d1ca7ce06a9f /include/linux
parente97839440656ab1cae408d36cda646221165c934 (diff)
sched: Move CPU cstate tracking under CONFIG_SCHED_HMP
While tracking C-states makes sense under CONFIG_SMP as well, cstate information is currently unused under CONFIG_SMP. Move it under CONFIG_SCHED_HMP for now since that is the only place it is relevant at the moment. Change-Id: Ifc5812cfe14ebf2b4d447100dcd87f02ab29ff7a Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h36
1 files changed, 19 insertions, 17 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5e644bdd107c..c326611099d7 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2346,10 +2346,6 @@ extern void do_set_cpus_allowed(struct task_struct *p,
extern int set_cpus_allowed_ptr(struct task_struct *p,
const struct cpumask *new_mask);
-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);
#else
static inline void do_set_cpus_allowed(struct task_struct *p,
const struct cpumask *new_mask)
@@ -2362,15 +2358,6 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
return -EINVAL;
return 0;
}
-static inline void
-sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency)
-{
-}
-
-static inline void sched_set_cluster_dstate(const cpumask_t *cluster_cpus,
- int dstate, int wakeup_energy, int wakeup_latency)
-{
-}
#endif
extern int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle);
@@ -2388,9 +2375,14 @@ extern unsigned int sched_get_static_cpu_pwr_cost(int cpu);
extern int sched_set_static_cluster_pwr_cost(int cpu, unsigned int cost);
extern unsigned int sched_get_static_cluster_pwr_cost(int cpu);
extern int sched_update_freq_max_load(const cpumask_t *cpumask);
-extern void sched_update_cpu_freq_min_max(const cpumask_t *cpus, u32 fmin, u32
- fmax);
-#else
+extern void sched_update_cpu_freq_min_max(const cpumask_t *cpus,
+ u32 fmin, u32 fmax);
+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);
+
+#else /* CONFIG_SCHED_HMP */
static inline int sched_set_boost(int enable)
{
return -EINVAL;
@@ -2403,7 +2395,17 @@ static inline int sched_update_freq_max_load(const cpumask_t *cpumask)
static inline void sched_update_cpu_freq_min_max(const cpumask_t *cpus,
u32 fmin, u32 fmax) { }
-#endif
+
+static inline void
+sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency)
+{
+}
+
+static inline void sched_set_cluster_dstate(const cpumask_t *cluster_cpus,
+ int dstate, int wakeup_energy, int wakeup_latency)
+{
+}
+#endif /* CONFIG_SCHED_HMP */
#ifdef CONFIG_NO_HZ_COMMON
void calc_load_enter_idle(void);