diff options
author | Luke Browning <lukebr@linux.vnet.ibm.com> | 2007-12-20 16:39:59 +0900 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-21 19:46:21 +1100 |
commit | e65c2f6fcebb9af0c3f53c796aff730dd657f5e7 (patch) | |
tree | 98b39e5efb858fc46022a5621aee07e57dad3919 /arch/powerpc/platforms/cell/spufs/context.c | |
parent | 9476141c185aa131fa8b4b6ccc5c0ccf92300225 (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.c | 31 |
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 6fa24d38706..290b10e4510 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) } /** - * spu_acquire_runnable - lock spu contex and make sure it is in runnable state - * @ctx: spu contex to lock - * - * Note: - * Returns 0 and with the context locked on success - * Returns negative error and with the context _unlocked_ on failure. - */ -int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags) -{ - int ret = -EINVAL; - - spu_acquire(ctx); - if (ctx->state == SPU_STATE_SAVED) { - /* - * Context is about to be freed, so we can't acquire it anymore. - */ - if (!ctx->owner) - goto out_unlock; - ret = spu_activate(ctx, flags); - if (ret) - goto out_unlock; - } - - return 0; - - out_unlock: - spu_release(ctx); - return ret; -} - -/** * spu_acquire_saved - lock spu contex and make sure it is in saved state * @ctx: spu contex to lock */ |