diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-04-28 08:37:47 (GMT) |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-04-29 08:08:03 (GMT) |
commit | c5c4591375a10f6bc1bc55d86af7764033b10367 (patch) | |
tree | caf9e8dcc98d04a4338f8f17d99c37cb3d0d7817 /arch/powerpc/platforms/cell/spufs/context.c | |
parent | a74e5e5facb854ab4be9e0320e0f65074012df9b (diff) | |
download | linux-fsl-qoriq-c5c4591375a10f6bc1bc55d86af7764033b10367.tar.xz |
[PATCH] powerpc: cell: use kzalloc in alloc_spu_context()
Use kzalloc when allocating a new spu context, rather than kmalloc +
zeroing.
Booted & tested on cell.
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 | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 8bb33ab..36439c5 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -30,7 +30,7 @@ struct spu_context *alloc_spu_context(void) { struct spu_context *ctx; - ctx = kmalloc(sizeof *ctx, GFP_KERNEL); + ctx = kzalloc(sizeof *ctx, GFP_KERNEL); if (!ctx) goto out; /* Binding to physical processor deferred @@ -48,17 +48,7 @@ struct spu_context *alloc_spu_context(void) init_waitqueue_head(&ctx->wbox_wq); init_waitqueue_head(&ctx->stop_wq); init_waitqueue_head(&ctx->mfc_wq); - ctx->ibox_fasync = NULL; - ctx->wbox_fasync = NULL; - ctx->mfc_fasync = NULL; - ctx->mfc = NULL; - ctx->tagwait = 0; ctx->state = SPU_STATE_SAVED; - ctx->local_store = NULL; - ctx->cntl = NULL; - ctx->signal1 = NULL; - ctx->signal2 = NULL; - ctx->spu = NULL; ctx->ops = &spu_backing_ops; ctx->owner = get_task_mm(current); goto out; |