diff options
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index df00cb09263e..5255c9d2e053 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -74,6 +74,7 @@ | |||
74 | 74 | ||
75 | #include <asm/tlb.h> | 75 | #include <asm/tlb.h> |
76 | #include <asm/irq_regs.h> | 76 | #include <asm/irq_regs.h> |
77 | #include <asm/mutex.h> | ||
77 | #ifdef CONFIG_PARAVIRT | 78 | #ifdef CONFIG_PARAVIRT |
78 | #include <asm/paravirt.h> | 79 | #include <asm/paravirt.h> |
79 | #endif | 80 | #endif |
@@ -723,9 +724,6 @@ static void dequeue_task(struct rq *rq, struct task_struct *p, int flags) | |||
723 | p->sched_class->dequeue_task(rq, p, flags); | 724 | p->sched_class->dequeue_task(rq, p, flags); |
724 | } | 725 | } |
725 | 726 | ||
726 | /* | ||
727 | * activate_task - move a task to the runqueue. | ||
728 | */ | ||
729 | void activate_task(struct rq *rq, struct task_struct *p, int flags) | 727 | void activate_task(struct rq *rq, struct task_struct *p, int flags) |
730 | { | 728 | { |
731 | if (task_contributes_to_load(p)) | 729 | if (task_contributes_to_load(p)) |
@@ -734,9 +732,6 @@ void activate_task(struct rq *rq, struct task_struct *p, int flags) | |||
734 | enqueue_task(rq, p, flags); | 732 | enqueue_task(rq, p, flags); |
735 | } | 733 | } |
736 | 734 | ||
737 | /* | ||
738 | * deactivate_task - remove a task from the runqueue. | ||
739 | */ | ||
740 | void deactivate_task(struct rq *rq, struct task_struct *p, int flags) | 735 | void deactivate_task(struct rq *rq, struct task_struct *p, int flags) |
741 | { | 736 | { |
742 | if (task_contributes_to_load(p)) | 737 | if (task_contributes_to_load(p)) |
@@ -4134,7 +4129,7 @@ recheck: | |||
4134 | on_rq = p->on_rq; | 4129 | on_rq = p->on_rq; |
4135 | running = task_current(rq, p); | 4130 | running = task_current(rq, p); |
4136 | if (on_rq) | 4131 | if (on_rq) |
4137 | deactivate_task(rq, p, 0); | 4132 | dequeue_task(rq, p, 0); |
4138 | if (running) | 4133 | if (running) |
4139 | p->sched_class->put_prev_task(rq, p); | 4134 | p->sched_class->put_prev_task(rq, p); |
4140 | 4135 | ||
@@ -4147,7 +4142,7 @@ recheck: | |||
4147 | if (running) | 4142 | if (running) |
4148 | p->sched_class->set_curr_task(rq); | 4143 | p->sched_class->set_curr_task(rq); |
4149 | if (on_rq) | 4144 | if (on_rq) |
4150 | activate_task(rq, p, 0); | 4145 | enqueue_task(rq, p, 0); |
4151 | 4146 | ||
4152 | check_class_changed(rq, p, prev_class, oldprio); | 4147 | check_class_changed(rq, p, prev_class, oldprio); |
4153 | task_rq_unlock(rq, p, &flags); | 4148 | task_rq_unlock(rq, p, &flags); |
@@ -4998,9 +4993,9 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu) | |||
4998 | * placed properly. | 4993 | * placed properly. |
4999 | */ | 4994 | */ |
5000 | if (p->on_rq) { | 4995 | if (p->on_rq) { |
5001 | deactivate_task(rq_src, p, 0); | 4996 | dequeue_task(rq_src, p, 0); |
5002 | set_task_cpu(p, dest_cpu); | 4997 | set_task_cpu(p, dest_cpu); |
5003 | activate_task(rq_dest, p, 0); | 4998 | enqueue_task(rq_dest, p, 0); |
5004 | check_preempt_curr(rq_dest, p, 0); | 4999 | check_preempt_curr(rq_dest, p, 0); |
5005 | } | 5000 | } |
5006 | done: | 5001 | done: |
@@ -7032,10 +7027,10 @@ static void normalize_task(struct rq *rq, struct task_struct *p) | |||
7032 | 7027 | ||
7033 | on_rq = p->on_rq; | 7028 | on_rq = p->on_rq; |
7034 | if (on_rq) | 7029 | if (on_rq) |
7035 | deactivate_task(rq, p, 0); | 7030 | dequeue_task(rq, p, 0); |
7036 | __setscheduler(rq, p, SCHED_NORMAL, 0); | 7031 | __setscheduler(rq, p, SCHED_NORMAL, 0); |
7037 | if (on_rq) { | 7032 | if (on_rq) { |
7038 | activate_task(rq, p, 0); | 7033 | enqueue_task(rq, p, 0); |
7039 | resched_task(rq->curr); | 7034 | resched_task(rq->curr); |
7040 | } | 7035 | } |
7041 | 7036 | ||