diff options
-rw-r--r-- | include/linux/vmalloc.h | 13 | ||||
-rw-r--r-- | kernel/kexec.c | 3 | ||||
-rw-r--r-- | mm/vmalloc.c | 11 |
3 files changed, 15 insertions, 12 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 8a25f9081ed0..7d5773a99f20 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -3,7 +3,9 @@ | |||
3 | 3 | ||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/list.h> | ||
6 | #include <asm/page.h> /* pgprot_t */ | 7 | #include <asm/page.h> /* pgprot_t */ |
8 | #include <linux/rbtree.h> | ||
7 | 9 | ||
8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 10 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
9 | 11 | ||
@@ -35,6 +37,17 @@ struct vm_struct { | |||
35 | const void *caller; | 37 | const void *caller; |
36 | }; | 38 | }; |
37 | 39 | ||
40 | struct vmap_area { | ||
41 | unsigned long va_start; | ||
42 | unsigned long va_end; | ||
43 | unsigned long flags; | ||
44 | struct rb_node rb_node; /* address sorted rbtree */ | ||
45 | struct list_head list; /* address sorted list */ | ||
46 | struct list_head purge_list; /* "lazy purge" list */ | ||
47 | struct vm_struct *vm; | ||
48 | struct rcu_head rcu_head; | ||
49 | }; | ||
50 | |||
38 | /* | 51 | /* |
39 | * Highlevel APIs for driver use | 52 | * Highlevel APIs for driver use |
40 | */ | 53 | */ |
diff --git a/kernel/kexec.c b/kernel/kexec.c index 0b1f7e780d46..b574920cbd4b 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -1615,7 +1615,8 @@ static int __init crash_save_vmcoreinfo_init(void) | |||
1615 | VMCOREINFO_OFFSET(free_area, free_list); | 1615 | VMCOREINFO_OFFSET(free_area, free_list); |
1616 | VMCOREINFO_OFFSET(list_head, next); | 1616 | VMCOREINFO_OFFSET(list_head, next); |
1617 | VMCOREINFO_OFFSET(list_head, prev); | 1617 | VMCOREINFO_OFFSET(list_head, prev); |
1618 | VMCOREINFO_OFFSET(vm_struct, addr); | 1618 | VMCOREINFO_OFFSET(vmap_area, va_start); |
1619 | VMCOREINFO_OFFSET(vmap_area, list); | ||
1619 | VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER); | 1620 | VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER); |
1620 | log_buf_kexec_setup(); | 1621 | log_buf_kexec_setup(); |
1621 | VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES); | 1622 | VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES); |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 151da8ac53fa..72043d6c88c0 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -249,17 +249,6 @@ EXPORT_SYMBOL(vmalloc_to_pfn); | |||
249 | #define VM_LAZY_FREEING 0x02 | 249 | #define VM_LAZY_FREEING 0x02 |
250 | #define VM_VM_AREA 0x04 | 250 | #define VM_VM_AREA 0x04 |
251 | 251 | ||
252 | struct vmap_area { | ||
253 | unsigned long va_start; | ||
254 | unsigned long va_end; | ||
255 | unsigned long flags; | ||
256 | struct rb_node rb_node; /* address sorted rbtree */ | ||
257 | struct list_head list; /* address sorted list */ | ||
258 | struct list_head purge_list; /* "lazy purge" list */ | ||
259 | struct vm_struct *vm; | ||
260 | struct rcu_head rcu_head; | ||
261 | }; | ||
262 | |||
263 | static DEFINE_SPINLOCK(vmap_area_lock); | 252 | static DEFINE_SPINLOCK(vmap_area_lock); |
264 | /* Export for kexec only */ | 253 | /* Export for kexec only */ |
265 | LIST_HEAD(vmap_area_list); | 254 | LIST_HEAD(vmap_area_list); |