[PATCH] sched: fix cpuprio build bug

From: Ingo Molnar
Date: Thu Jun 05 2008 - 06:25:37 EST


this patch was not built on !SMP:

kernel/sched_rt.c: In function 'inc_rt_tasks':
kernel/sched_rt.c:404: error: 'struct rq' has no member named 'online'

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/sched_rt.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index e482159..eaa6060 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -399,16 +399,19 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, =
struct rt_rq *rt_rq)
#if defined CONFIG_SMP || defined CONFIG_RT_GROUP_SCHED
if (rt_se_prio(rt_se) < rt_rq->highest_prio) {
struct rq *rq =3D rq_of_rt_rq(rt_rq);
- rt_rq->highest_prio =3D rt_se_prio(rt_se);
=20
+ rt_rq->highest_prio =3D rt_se_prio(rt_se);
+#ifdef CONFIG_SMP
if (rq->online)
cpupri_set(&rq->rd->cpupri, rq->cpu,
rt_se_prio(rt_se));
+#endif
}
#endif
#ifdef CONFIG_SMP
if (rt_se->nr_cpus_allowed > 1) {
struct rq *rq =3D rq_of_rt_rq(rt_rq);
+
rq->rt.rt_nr_migratory++;
}
=20
--=20
1.5.4.5


--=__Part38111C76.4__=--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/