diff options
author | Paul Mackerras <paulus@samba.org> | 2007-09-19 20:09:27 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-19 20:09:27 -0400 |
commit | 0ce49a3945474fc942ec37c0c0efece60f592f80 (patch) | |
tree | f42b821b2d9e2d8775bc22f56d444c2cc7b7b7dd /arch/powerpc/platforms | |
parent | 9e4859ef5462193643fd2b3c8ffb298e5a4a4319 (diff) | |
parent | a88a8eff1e6e32d3288986a9d36c6a449c032d3a (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 17806e001e50..4d257b3f9336 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -594,7 +594,7 @@ static struct spu *find_victim(struct spu_context *ctx) | |||
594 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { | 594 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { |
595 | struct spu_context *tmp = spu->ctx; | 595 | struct spu_context *tmp = spu->ctx; |
596 | 596 | ||
597 | if (tmp->prio > ctx->prio && | 597 | if (tmp && tmp->prio > ctx->prio && |
598 | (!victim || tmp->prio > victim->prio)) | 598 | (!victim || tmp->prio > victim->prio)) |
599 | victim = spu->ctx; | 599 | victim = spu->ctx; |
600 | } | 600 | } |
@@ -626,9 +626,9 @@ static struct spu *find_victim(struct spu_context *ctx) | |||
626 | 626 | ||
627 | mutex_lock(&cbe_spu_info[node].list_mutex); | 627 | mutex_lock(&cbe_spu_info[node].list_mutex); |
628 | cbe_spu_info[node].nr_active--; | 628 | cbe_spu_info[node].nr_active--; |
629 | spu_unbind_context(spu, victim); | ||
629 | mutex_unlock(&cbe_spu_info[node].list_mutex); | 630 | mutex_unlock(&cbe_spu_info[node].list_mutex); |
630 | 631 | ||
631 | spu_unbind_context(spu, victim); | ||
632 | victim->stats.invol_ctx_switch++; | 632 | victim->stats.invol_ctx_switch++; |
633 | spu->stats.invol_ctx_switch++; | 633 | spu->stats.invol_ctx_switch++; |
634 | mutex_unlock(&victim->state_mutex); | 634 | mutex_unlock(&victim->state_mutex); |