aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-04-28 04:37:47 -0400
committerPaul Mackerras <paulus@samba.org>2006-04-29 04:08:03 -0400
commitc5c4591375a10f6bc1bc55d86af7764033b10367 (patch)
treecaf9e8dcc98d04a4338f8f17d99c37cb3d0d7817 /arch/powerpc
parenta74e5e5facb854ab4be9e0320e0f65074012df9b (diff)
[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')
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c12
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 8bb33abfad17..36439c5e9f2d 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -30,7 +30,7 @@
30struct spu_context *alloc_spu_context(void) 30struct spu_context *alloc_spu_context(void)
31{ 31{
32 struct spu_context *ctx; 32 struct spu_context *ctx;
33 ctx = kmalloc(sizeof *ctx, GFP_KERNEL); 33 ctx = kzalloc(sizeof *ctx, GFP_KERNEL);
34 if (!ctx) 34 if (!ctx)
35 goto out; 35 goto out;
36 /* Binding to physical processor deferred 36 /* Binding to physical processor deferred
@@ -48,17 +48,7 @@ struct spu_context *alloc_spu_context(void)
48 init_waitqueue_head(&ctx->wbox_wq); 48 init_waitqueue_head(&ctx->wbox_wq);
49 init_waitqueue_head(&ctx->stop_wq); 49 init_waitqueue_head(&ctx->stop_wq);
50 init_waitqueue_head(&ctx->mfc_wq); 50 init_waitqueue_head(&ctx->mfc_wq);
51 ctx->ibox_fasync = NULL;
52 ctx->wbox_fasync = NULL;
53 ctx->mfc_fasync = NULL;
54 ctx->mfc = NULL;
55 ctx->tagwait = 0;
56 ctx->state = SPU_STATE_SAVED; 51 ctx->state = SPU_STATE_SAVED;
57 ctx->local_store = NULL;
58 ctx->cntl = NULL;
59 ctx->signal1 = NULL;
60 ctx->signal2 = NULL;
61 ctx->spu = NULL;
62 ctx->ops = &spu_backing_ops; 52 ctx->ops = &spu_backing_ops;
63 ctx->owner = get_task_mm(current); 53 ctx->owner = get_task_mm(current);
64 goto out; 54 goto out;