summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/hw_ops.c
diff options
context:
space:
mode:
authorMark Nutter <mnutter@us.ibm.com>2006-10-24 20:31:16 +0400
committerPaul Mackerras <paulus@samba.org>2006-10-25 08:20:21 +0400
commit5737edd1ddbde5ab7f63bb3cb36015edbdb7c295 (patch)
tree10162eb7c27fa0a3d1614c2d46fdcf2c87410d3a /arch/powerpc/platforms/cell/spufs/hw_ops.c
parentcc21a66d7f727ab97b27af9cf763bc0b51510ffa (diff)
downloadlinux-5737edd1ddbde5ab7f63bb3cb36015edbdb7c295.tar.xz
[POWERPC] spufs: add support for nonschedulable contexts
This adds two new flags to spu_create: SPU_CREATE_NONSCHED: create a context that is never moved away from an SPE once it has started running. This flag can only be used by tasks with the CAP_SYS_NICE capability. SPU_CREATE_ISOLATED: create a nonschedulable context that enters isolation mode upon first run. This requires the SPU_CREATE_NONSCHED flag. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/hw_ops.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/hw_ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c
index efc452e71ab0..2ad534a04be8 100644
--- a/arch/powerpc/platforms/cell/spufs/hw_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c
@@ -219,8 +219,11 @@ static char *spu_hw_get_ls(struct spu_context *ctx)
static void spu_hw_runcntl_write(struct spu_context *ctx, u32 val)
{
- eieio();
+ spin_lock_irq(&ctx->spu->register_lock);
+ if (val & SPU_RUNCNTL_ISOLATE)
+ out_be64(&ctx->spu->priv2->spu_privcntl_RW, 4LL);
out_be32(&ctx->spu->problem->spu_runcntl_RW, val);
+ spin_unlock_irq(&ctx->spu->register_lock);
}
static void spu_hw_runcntl_stop(struct spu_context *ctx)