aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/context.c
diff options
context:
space:
mode:
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 */