summaryrefslogtreecommitdiff
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorOlav Haugan <ohaugan@codeaurora.org>2017-02-01 17:59:51 -0800
committerOlav Haugan <ohaugan@codeaurora.org>2017-02-02 10:23:08 -0800
commit475820b5bcfa8e8cc266db079df6cb2ee4d4d600 (patch)
tree146e6c7bd84cb8aaf455e34873bc7279323ca5eb /kernel/sched/rt.c
parentaf883d4db0b398542bb561808a11019f0998d129 (diff)
sched: Remove sched_enable_hmp flag
Clean up the code and make it more maintainable by removing dependency on the sched_enable_hmp flag. We do not support HMP scheduler without recompiling. Enabling the HMP scheduler is done through enabling the CONFIG_SCHED_HMP config. Change-Id: I246c1b1889f8dcbc8f0a0805077c0ce5d4f083b0 Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 3fe00d6fa335..b72352bbd752 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1406,6 +1406,7 @@ static void yield_task_rt(struct rq *rq)
#ifdef CONFIG_SMP
static int find_lowest_rq(struct task_struct *task);
+#ifdef CONFIG_SCHED_HMP
static int
select_task_rq_rt_hmp(struct task_struct *p, int cpu, int sd_flag, int flags)
{
@@ -1419,6 +1420,7 @@ select_task_rq_rt_hmp(struct task_struct *p, int cpu, int sd_flag, int flags)
return cpu;
}
+#endif
static int
select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags)
@@ -1426,8 +1428,9 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags)
struct task_struct *curr;
struct rq *rq;
- if (sched_enable_hmp)
- return select_task_rq_rt_hmp(p, cpu, sd_flag, flags);
+#ifdef CONFIG_SCHED_HMP
+ return select_task_rq_rt_hmp(p, cpu, sd_flag, flags);
+#endif
/* For anything but wake ups, just return the task_cpu */
if (sd_flag != SD_BALANCE_WAKE && sd_flag != SD_BALANCE_FORK)
@@ -1796,14 +1799,6 @@ static int find_lowest_rq_hmp(struct task_struct *task)
return best_cpu;
}
-
-#else /* CONFIG_SCHED_HMP */
-
-static int find_lowest_rq_hmp(struct task_struct *task)
-{
- return -1;
-}
-
#endif /* CONFIG_SCHED_HMP */
static int find_lowest_rq(struct task_struct *task)
@@ -1813,8 +1808,9 @@ static int find_lowest_rq(struct task_struct *task)
int this_cpu = smp_processor_id();
int cpu = task_cpu(task);
- if (sched_enable_hmp)
- return find_lowest_rq_hmp(task);
+#ifdef CONFIG_SCHED_HMP
+ return find_lowest_rq_hmp(task);
+#endif
/* Make sure the mask is initialized first */
if (unlikely(!lowest_mask))