blob: e58c80590ebcd274edbacd1dccf2f63578595b24 [file] [log] [blame]
Stephen Rothwell7b2c3c52007-09-17 14:08:06 +10001#include <linux/types.h>
2#include <linux/init.h>
3#include <linux/slab.h>
4#include <linux/bootmem.h>
5
6#include <asm/system.h>
7
8void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask)
9{
10 if (mem_init_done)
11 return kmalloc(size, mask);
12 else
13 return alloc_bootmem(size);
14}