]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[POWERPC] avoid SPU_ACTIVATE_NOWAKE optimization
authorChristoph Hellwig <hch@lst.de>
Fri, 9 Mar 2007 23:05:36 +0000 (00:05 +0100)
committerArnd Bergmann <arnd@klappe.arndb.de>
Fri, 9 Mar 2007 23:07:49 +0000 (00:07 +0100)
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>
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/spufs.h

index 353a8fa07ab87797694de155d6ba50f65ebc06d3..f95a611ca36281fce6c8997f1486209898f8d162 100644 (file)
@@ -143,7 +143,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
        int ret;
        unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
 
-       ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
+       ret = spu_acquire_runnable(ctx, 0);
        if (ret)
                return ret;
 
@@ -155,7 +155,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
                        spu_release(ctx);
                        ret = spu_setup_isolated(ctx);
                        if (!ret)
-                               ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
+                               ret = spu_acquire_runnable(ctx, 0);
                }
 
                /* if userspace has set the runcntrl register (eg, to issue an
index 2f25e68b4bac1c5c8eb95160ba73d1ebfec44b81..7dbf57c302828ebf85518820ac8cd5a1fc785a7d 100644 (file)
@@ -263,7 +263,6 @@ static void spu_prio_wait(struct spu_context *ctx)
 {
        DEFINE_WAIT(wait);
 
-       set_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
        prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
        if (!signal_pending(current)) {
                mutex_unlock(&ctx->state_mutex);
@@ -272,7 +271,6 @@ static void spu_prio_wait(struct spu_context *ctx)
        }
        __set_current_state(TASK_RUNNING);
        remove_wait_queue(&ctx->stop_wq, &wait);
-       clear_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
 }
 
 /**
@@ -292,7 +290,7 @@ static void spu_reschedule(struct spu *spu)
        best = sched_find_first_bit(spu_prio->bitmap);
        if (best < MAX_PRIO) {
                struct spu_context *ctx = spu_grab_context(best);
-               if (ctx && test_bit(SPU_SCHED_WAKE, &ctx->sched_flags))
+               if (ctx)
                        wake_up(&ctx->stop_wq);
        }
        spin_unlock(&spu_prio->runq_lock);
@@ -414,8 +412,7 @@ int spu_activate(struct spu_context *ctx, unsigned long flags)
                }
 
                spu_add_to_rq(ctx);
-               if (!(flags & SPU_ACTIVATE_NOWAKE))
-                       spu_prio_wait(ctx);
+               spu_prio_wait(ctx);
                spu_del_from_rq(ctx);
        } while (!signal_pending(current));
 
index 0c437891dfd5cf6b25af3cc1248b033192627ea1..5c4e47d69d79478a37d7ff62563b5dea8d6fd7b8 100644 (file)
@@ -41,7 +41,7 @@ struct spu_gang;
 
 /* ctx->sched_flags */
 enum {
-       SPU_SCHED_WAKE = 0,
+       SPU_SCHED_WAKE = 0, /* currently unused */
 };
 
 struct spu_context {
@@ -191,9 +191,7 @@ void spu_forget(struct spu_context *ctx);
 int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
 void spu_acquire_saved(struct spu_context *ctx);
 int spu_acquire_exclusive(struct spu_context *ctx);
-enum {
-       SPU_ACTIVATE_NOWAKE = 1,
-};
+
 int spu_activate(struct spu_context *ctx, unsigned long flags);
 void spu_deactivate(struct spu_context *ctx);
 void spu_yield(struct spu_context *ctx);