aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/context.c
diff options
context:
space:
mode:
authorLuke Browning <lukebr@linux.vnet.ibm.com>2007-12-20 02:39:59 -0500
committerPaul Mackerras <paulus@samba.org>2007-12-21 03:46:21 -0500
commite65c2f6fcebb9af0c3f53c796aff730dd657f5e7 (patch)
tree98b39e5efb858fc46022a5621aee07e57dad3919 /arch/powerpc/platforms/cell/spufs/context.c
parent9476141c185aa131fa8b4b6ccc5c0ccf92300225 (diff)
[POWERPC] spufs: decouple spu scheduler from spufs_spu_run (asynchronous scheduling)
Change spufs_spu_run so that the context is queued directly to the scheduler and the controlling thread advances directly to spufs_wait() for spe errors and exceptions. nosched contexts are treated the same as before. Fixes from Christoph Hellwig <hch@lst.de> Signed-off-by: Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/context.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 6fa24d38706e..290b10e45105 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -134,37 +134,6 @@ void spu_unmap_mappings(struct spu_context *ctx)
134} 134}
135 135
136/** 136/**
137 * spu_acquire_runnable - lock spu contex and make sure it is in runnable state
138 * @ctx: spu contex to lock
139 *
140 * Note:
141 * Returns 0 and with the context locked on success
142 * Returns negative error and with the context _unlocked_ on failure.
143 */
144int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
145{
146 int ret = -EINVAL;
147
148 spu_acquire(ctx);
149 if (ctx->state == SPU_STATE_SAVED) {
150 /*
151 * Context is about to be freed, so we can't acquire it anymore.
152 */
153 if (!ctx->owner)
154 goto out_unlock;
155 ret = spu_activate(ctx, flags);
156 if (ret)
157 goto out_unlock;
158 }
159
160 return 0;
161
162 out_unlock:
163 spu_release(ctx);
164 return ret;
165}
166
167/**
168 * spu_acquire_saved - lock spu contex and make sure it is in saved state 137 * spu_acquire_saved - lock spu contex and make sure it is in saved state
169 * @ctx: spu contex to lock 138 * @ctx: spu contex to lock
170 */ 139 */