diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-05-25 08:01:35 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-06-11 12:17:05 -0400 |
commit | 43ebdac42f16037263b52a5aeedcd1bfa4a9bb29 (patch) | |
tree | 8f288e9875418fbebd48f9bb31ac22ebae37838c /mm | |
parent | 83b519e8b9572c319c8e0c615ee5dd7272856090 (diff) |
vmalloc: use kzalloc() instead of alloc_bootmem()
We can call vmalloc_init() after kmem_cache_init() and use kzalloc() instead of
the bootmem allocator when initializing vmalloc data structures.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Nick Piggin <npiggin@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmalloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 083716ea38c9..323513858c20 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/rbtree.h> | 23 | #include <linux/rbtree.h> |
24 | #include <linux/radix-tree.h> | 24 | #include <linux/radix-tree.h> |
25 | #include <linux/rcupdate.h> | 25 | #include <linux/rcupdate.h> |
26 | #include <linux/bootmem.h> | ||
27 | #include <linux/pfn.h> | 26 | #include <linux/pfn.h> |
28 | 27 | ||
29 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
@@ -1032,7 +1031,7 @@ void __init vmalloc_init(void) | |||
1032 | 1031 | ||
1033 | /* Import existing vmlist entries. */ | 1032 | /* Import existing vmlist entries. */ |
1034 | for (tmp = vmlist; tmp; tmp = tmp->next) { | 1033 | for (tmp = vmlist; tmp; tmp = tmp->next) { |
1035 | va = alloc_bootmem(sizeof(struct vmap_area)); | 1034 | va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT); |
1036 | va->flags = tmp->flags | VM_VM_AREA; | 1035 | va->flags = tmp->flags | VM_VM_AREA; |
1037 | va->va_start = (unsigned long)tmp->addr; | 1036 | va->va_start = (unsigned long)tmp->addr; |
1038 | va->va_end = va->va_start + tmp->size; | 1037 | va->va_end = va->va_start + tmp->size; |