mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
[PATCH] add slab_is_available() routine for boot code
slab_is_available() indicates slab based allocators are available for use. SPARSEMEM code needs to know this as it can be called at various times during the boot process. Signed-off-by: Mike Kravetz <kravetz@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
48564e628b
commit
39d24e6426
3 changed files with 10 additions and 1 deletions
|
@ -32,7 +32,7 @@ static struct mem_section *sparse_index_alloc(int nid)
|
|||
unsigned long array_size = SECTIONS_PER_ROOT *
|
||||
sizeof(struct mem_section);
|
||||
|
||||
if (system_state == SYSTEM_RUNNING)
|
||||
if (slab_is_available())
|
||||
section = kmalloc_node(array_size, GFP_KERNEL, nid);
|
||||
else
|
||||
section = alloc_bootmem_node(NODE_DATA(nid), array_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue