summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-04-23 16:02:10 +1000
committerJeremy Kerr <jk@ozlabs.org>2008-05-05 13:33:43 +1000
commitd29694f0681e188cf75477f20904041744e78ef7 (patch)
tree5c515a71302a1ad4a560c028e6a745bc11b6e400 /arch/powerpc
parentc0bace5c7029ef7cbb6e6ffaa0469a3c042e5029 (diff)
[POWERPC] spufs: don't acquire state_mutex interruptible while performing callback
There's currently no way to tell if spu_process_callback has returned with the state mutex held, as -EINTR may be returned by either the syscall or the spu_acquire fail case. Instead, just do a non-interruptible mutex_lock here. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 0634fecfe54..e764a43b544 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -294,7 +294,7 @@ static int spu_process_callback(struct spu_context *ctx)
u32 ls_pointer, npc;
void __iomem *ls;
long spu_ret;
- int ret, ret2;
+ int ret;
/* get syscall block from local store */
npc = ctx->ops->npc_read(ctx) & ~3;
@@ -316,11 +316,9 @@ static int spu_process_callback(struct spu_context *ctx)
if (spu_ret <= -ERESTARTSYS) {
ret = spu_handle_restartsys(ctx, &spu_ret, &npc);
}
- ret2 = spu_acquire(ctx);
+ mutex_lock(&ctx->state_mutex);
if (ret == -ERESTARTSYS)
return ret;
- if (ret2)
- return -EINTR;
}
/* need to re-get the ls, as it may have changed when we released the