aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_pfp.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/sched_pfp.c')
-rw-r--r--litmus/sched_pfp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c
index 7f9a49d9d373..20a7085e8710 100644
--- a/litmus/sched_pfp.c
+++ b/litmus/sched_pfp.c
@@ -1162,19 +1162,15 @@ static void pfp_migrate_to(int target_cpu)
1162 from = task_pfp(t); 1162 from = task_pfp(t);
1163 to = remote_pfp(target_cpu); 1163 to = remote_pfp(target_cpu);
1164 1164
1165 if (from < to) { 1165 raw_spin_lock(&from->slock);
1166 raw_spin_lock(&from->slock);
1167 raw_spin_lock(&to->slock);
1168 } else {
1169 raw_spin_lock(&to->slock);
1170 raw_spin_lock(&from->slock);
1171 }
1172 1166
1173 /* switch partitions */ 1167 /* switch partitions */
1174 tsk_rt(t)->task_params.cpu = target_cpu; 1168 tsk_rt(t)->task_params.cpu = target_cpu;
1175 1169
1176 raw_spin_unlock(&from->slock); 1170 raw_spin_unlock(&from->slock);
1177 1171
1172 raw_spin_lock(&to->slock);
1173
1178 requeue(t, to); 1174 requeue(t, to);
1179 if (fp_preemption_needed(&to->ready_queue, to->scheduled)) 1175 if (fp_preemption_needed(&to->ready_queue, to->scheduled))
1180 preempt(to); 1176 preempt(to);