mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
sched: Fix cpupri build on !CONFIG_SMP
This build bug: In file included from kernel/sched.c:1765: kernel/sched_rt.c: In function ‘has_pushable_tasks’: kernel/sched_rt.c:1069: error: ‘struct rt_rq’ has no member named ‘pushable_tasks’ kernel/sched_rt.c: In function ‘pick_next_task_rt’: kernel/sched_rt.c:1084: error: ‘struct rq’ has no member named ‘post_schedule’ Triggers because both pushable_tasks and post_schedule are SMP-only fields. Move pushable_tasks() to the SMP section and #ifdef the post_schedule use. Cc: Gregory Haskins <ghaskins@novell.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090729150422.17691.55590.stgit@dev.haskins.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
693525e3be
commit
bcf08df3b2
1 changed files with 7 additions and 5 deletions
|
@ -136,6 +136,11 @@ static void dequeue_pushable_task(struct rq *rq, struct task_struct *p)
|
||||||
plist_del(&p->pushable_tasks, &rq->rt.pushable_tasks);
|
plist_del(&p->pushable_tasks, &rq->rt.pushable_tasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int has_pushable_tasks(struct rq *rq)
|
||||||
|
{
|
||||||
|
return !plist_head_empty(&rq->rt.pushable_tasks);
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline void enqueue_pushable_task(struct rq *rq, struct task_struct *p)
|
static inline void enqueue_pushable_task(struct rq *rq, struct task_struct *p)
|
||||||
|
@ -1064,11 +1069,6 @@ static struct task_struct *_pick_next_task_rt(struct rq *rq)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int has_pushable_tasks(struct rq *rq)
|
|
||||||
{
|
|
||||||
return !plist_head_empty(&rq->rt.pushable_tasks);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct task_struct *pick_next_task_rt(struct rq *rq)
|
static struct task_struct *pick_next_task_rt(struct rq *rq)
|
||||||
{
|
{
|
||||||
struct task_struct *p = _pick_next_task_rt(rq);
|
struct task_struct *p = _pick_next_task_rt(rq);
|
||||||
|
@ -1077,11 +1077,13 @@ static struct task_struct *pick_next_task_rt(struct rq *rq)
|
||||||
if (p)
|
if (p)
|
||||||
dequeue_pushable_task(rq, p);
|
dequeue_pushable_task(rq, p);
|
||||||
|
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
/*
|
/*
|
||||||
* We detect this state here so that we can avoid taking the RQ
|
* We detect this state here so that we can avoid taking the RQ
|
||||||
* lock again later if there is no need to push
|
* lock again later if there is no need to push
|
||||||
*/
|
*/
|
||||||
rq->post_schedule = has_pushable_tasks(rq);
|
rq->post_schedule = has_pushable_tasks(rq);
|
||||||
|
#endif
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue