powerpc/cell: Use vzalloc rather than vmalloc and memset in spu_alloc_lscsa_std

Hi,

We can get rid of a memset in
arch/powerpc/platforms/cell/spufs/lscsa_alloc.c::spu_alloc_lscsa_std() by
using vzalloc() rather than vmalloc()+memset().

Completely untested patch below since I have no hardware nor tools to
compile this.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Jesper Juhl 2010-10-30 08:10:41 +00:00 committed by Benjamin Herrenschmidt
parent cd34206e94
commit 467d93a7ee
1 changed files with 1 additions and 2 deletions

View File

@ -36,10 +36,9 @@ static int spu_alloc_lscsa_std(struct spu_state *csa)
struct spu_lscsa *lscsa;
unsigned char *p;
lscsa = vmalloc(sizeof(struct spu_lscsa));
lscsa = vzalloc(sizeof(struct spu_lscsa));
if (!lscsa)
return -ENOMEM;
memset(lscsa, 0, sizeof(struct spu_lscsa));
csa->lscsa = lscsa;
/* Set LS pages reserved to allow for user-space mapping. */