aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/sched.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-02-13 15:54:22 -0500
committerArnd Bergmann <arnd@klappe.arndb.de>2007-02-13 15:55:40 -0500
commit8389998ae9ea2888c86c446f7911ddced50052a1 (patch)
treedb92e84e16513497344b9bd42b151934cfd881c3 /arch/powerpc/platforms/cell/spufs/sched.c
parent6a0641e51011def4e308fd07387047f5ee50647f (diff)
[POWERPC] spufs: move prio to spu_context
It doesn't make any sense to have a priority field in the physical spu structure. Move it into the spu context instead. Signed-off-by: Christoph Hellwig <hch@lst.de> 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.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index c61a34b1408..03b357ce398 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -145,7 +145,6 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
145 ctx->spu = spu; 145 ctx->spu = spu;
146 ctx->ops = &spu_hw_ops; 146 ctx->ops = &spu_hw_ops;
147 spu->pid = current->pid; 147 spu->pid = current->pid;
148 spu->prio = current->prio;
149 spu->mm = ctx->owner; 148 spu->mm = ctx->owner;
150 mm_needs_global_tlbie(spu->mm); 149 mm_needs_global_tlbie(spu->mm);
151 spu->ibox_callback = spufs_ibox_callback; 150 spu->ibox_callback = spufs_ibox_callback;
@@ -189,7 +188,6 @@ static int spu_unbind_context(struct spu *spu, struct spu_context *ctx)
189 spu->dma_callback = NULL; 188 spu->dma_callback = NULL;
190 spu->mm = NULL; 189 spu->mm = NULL;
191 spu->pid = 0; 190 spu->pid = 0;
192 spu->prio = MAX_PRIO;
193 ctx->ops = &spu_backing_ops; 191 ctx->ops = &spu_backing_ops;
194 ctx->spu = NULL; 192 ctx->spu = NULL;
195 spu->flags = 0; 193 spu->flags = 0;
@@ -223,7 +221,7 @@ static inline void spu_del_wq(wait_queue_head_t * wq, wait_queue_t * wait,
223 221
224static void spu_prio_wait(struct spu_context *ctx, u64 flags) 222static void spu_prio_wait(struct spu_context *ctx, u64 flags)
225{ 223{
226 int prio = current->prio; 224 int prio = ctx->prio;
227 wait_queue_head_t *wq = &spu_prio->waitq[prio]; 225 wait_queue_head_t *wq = &spu_prio->waitq[prio];
228 DEFINE_WAIT(wait); 226 DEFINE_WAIT(wait);
229 227
@@ -342,8 +340,6 @@ void spu_yield(struct spu_context *ctx)
342 __FUNCTION__, spu->number, spu->node); 340 __FUNCTION__, spu->number, spu->node);
343 spu_deactivate(ctx); 341 spu_deactivate(ctx);
344 need_yield = 1; 342 need_yield = 1;
345 } else {
346 spu->prio = MAX_PRIO;
347 } 343 }
348 } 344 }
349 mutex_unlock(&ctx->state_mutex); 345 mutex_unlock(&ctx->state_mutex);