diff options
author | Christoph Hellwig <hch@lst.de> | 2007-03-09 18:05:36 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-03-09 18:07:49 -0500 |
commit | 50b520d4efbce45281f58112789470ec7965fd33 (patch) | |
tree | 4d161a9dbf0b73f13b448591183cc56d6bdb545f /arch/powerpc/platforms/cell/spufs/sched.c | |
parent | aa0ed2bdb663608d5e409faecff3e1e81a3d413a (diff) |
[POWERPC] avoid SPU_ACTIVATE_NOWAKE optimization
This optimization was added recently but is still buggy,
so back it out for now.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sched.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 2f25e68b4bac..7dbf57c30282 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -263,7 +263,6 @@ static void spu_prio_wait(struct spu_context *ctx) | |||
263 | { | 263 | { |
264 | DEFINE_WAIT(wait); | 264 | DEFINE_WAIT(wait); |
265 | 265 | ||
266 | set_bit(SPU_SCHED_WAKE, &ctx->sched_flags); | ||
267 | prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE); | 266 | prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE); |
268 | if (!signal_pending(current)) { | 267 | if (!signal_pending(current)) { |
269 | mutex_unlock(&ctx->state_mutex); | 268 | mutex_unlock(&ctx->state_mutex); |
@@ -272,7 +271,6 @@ static void spu_prio_wait(struct spu_context *ctx) | |||
272 | } | 271 | } |
273 | __set_current_state(TASK_RUNNING); | 272 | __set_current_state(TASK_RUNNING); |
274 | remove_wait_queue(&ctx->stop_wq, &wait); | 273 | remove_wait_queue(&ctx->stop_wq, &wait); |
275 | clear_bit(SPU_SCHED_WAKE, &ctx->sched_flags); | ||
276 | } | 274 | } |
277 | 275 | ||
278 | /** | 276 | /** |
@@ -292,7 +290,7 @@ static void spu_reschedule(struct spu *spu) | |||
292 | best = sched_find_first_bit(spu_prio->bitmap); | 290 | best = sched_find_first_bit(spu_prio->bitmap); |
293 | if (best < MAX_PRIO) { | 291 | if (best < MAX_PRIO) { |
294 | struct spu_context *ctx = spu_grab_context(best); | 292 | struct spu_context *ctx = spu_grab_context(best); |
295 | if (ctx && test_bit(SPU_SCHED_WAKE, &ctx->sched_flags)) | 293 | if (ctx) |
296 | wake_up(&ctx->stop_wq); | 294 | wake_up(&ctx->stop_wq); |
297 | } | 295 | } |
298 | spin_unlock(&spu_prio->runq_lock); | 296 | spin_unlock(&spu_prio->runq_lock); |
@@ -414,8 +412,7 @@ int spu_activate(struct spu_context *ctx, unsigned long flags) | |||
414 | } | 412 | } |
415 | 413 | ||
416 | spu_add_to_rq(ctx); | 414 | spu_add_to_rq(ctx); |
417 | if (!(flags & SPU_ACTIVATE_NOWAKE)) | 415 | spu_prio_wait(ctx); |
418 | spu_prio_wait(ctx); | ||
419 | spu_del_from_rq(ctx); | 416 | spu_del_from_rq(ctx); |
420 | } while (!signal_pending(current)); | 417 | } while (!signal_pending(current)); |
421 | 418 | ||