diff options
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index c5db9a7264d9..7e00b280648a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/rbtree.h> | 24 | #include <linux/rbtree.h> |
25 | #include <linux/radix-tree.h> | 25 | #include <linux/radix-tree.h> |
26 | #include <linux/rcupdate.h> | 26 | #include <linux/rcupdate.h> |
27 | #include <linux/bootmem.h> | ||
27 | 28 | ||
28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
@@ -984,6 +985,8 @@ EXPORT_SYMBOL(vm_map_ram); | |||
984 | 985 | ||
985 | void __init vmalloc_init(void) | 986 | void __init vmalloc_init(void) |
986 | { | 987 | { |
988 | struct vmap_area *va; | ||
989 | struct vm_struct *tmp; | ||
987 | int i; | 990 | int i; |
988 | 991 | ||
989 | for_each_possible_cpu(i) { | 992 | for_each_possible_cpu(i) { |
@@ -996,6 +999,14 @@ void __init vmalloc_init(void) | |||
996 | vbq->nr_dirty = 0; | 999 | vbq->nr_dirty = 0; |
997 | } | 1000 | } |
998 | 1001 | ||
1002 | /* Import existing vmlist entries. */ | ||
1003 | for (tmp = vmlist; tmp; tmp = tmp->next) { | ||
1004 | va = alloc_bootmem(sizeof(struct vmap_area)); | ||
1005 | va->flags = tmp->flags | VM_VM_AREA; | ||
1006 | va->va_start = (unsigned long)tmp->addr; | ||
1007 | va->va_end = va->va_start + tmp->size; | ||
1008 | __insert_vmap_area(va); | ||
1009 | } | ||
999 | vmap_initialized = true; | 1010 | vmap_initialized = true; |
1000 | } | 1011 | } |
1001 | 1012 | ||