ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()
[linux/fpc-iii.git] / arch / powerpc / lib / alloc.c
blob60b0b3fc8fc19725b60e660e41fe48ebb5ea757a
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 (slab_is_available())
14 p = kzalloc(size, mask);
15 else {
16 p = memblock_virt_alloc(size, 0);
18 return p;