Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / arch / powerpc / lib / alloc.c
blobda22c84a8fed6c13421740ce02199560f3896a70
1 #include <linux/types.h>
2 #include <linux/init.h>
3 #include <linux/slab.h>
4 #include <linux/bootmem.h>
5 #include <linux/string.h>
6 #include <asm/setup.h>
9 void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask)
11 void *p;
13 if (mem_init_done)
14 p = kzalloc(size, mask);
15 else {
16 p = alloc_bootmem(size);
17 if (p)
18 memset(p, 0, size);
20 return p;