aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonsoo Kim <js1304@gmail.com>2013-04-29 18:07:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:54:34 -0400
commitf1c4069e1dc128dc8a851174cba2e273652e9216 (patch)
treecb5b315796926eb14fe7ee3c0db8b616e38ccb63
parentd4033afdf8282802ad28b0ed854393454115a071 (diff)
mm, vmalloc: export vmap_area_list, instead of vmlist
Although our intention is to unexport internal structure entirely, but there is one exception for kexec. kexec dumps address of vmlist and makedumpfile uses this information. We are about to remove vmlist, then another way to retrieve information of vmalloc layer is needed for makedumpfile. For this purpose, we export vmap_area_list, instead of vmlist. Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Dave Anderson <anderson@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/vmalloc.h3
-rw-r--r--kernel/kexec.c2
-rw-r--r--mm/nommu.c3
-rw-r--r--mm/vmalloc.c11
4 files changed, 9 insertions, 10 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 698b1e50d3a4..8a25f9081ed0 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -130,8 +130,7 @@ extern long vwrite(char *buf, char *addr, unsigned long count);
130/* 130/*
131 * Internals. Dont't use.. 131 * Internals. Dont't use..
132 */ 132 */
133extern rwlock_t vmlist_lock; 133extern struct list_head vmap_area_list;
134extern struct vm_struct *vmlist;
135extern __init void vm_area_add_early(struct vm_struct *vm); 134extern __init void vm_area_add_early(struct vm_struct *vm);
136extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); 135extern __init void vm_area_register_early(struct vm_struct *vm, size_t align);
137 136
diff --git a/kernel/kexec.c b/kernel/kexec.c
index b19181d44201..0b1f7e780d46 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1577,7 +1577,7 @@ static int __init crash_save_vmcoreinfo_init(void)
1577 VMCOREINFO_SYMBOL(swapper_pg_dir); 1577 VMCOREINFO_SYMBOL(swapper_pg_dir);
1578#endif 1578#endif
1579 VMCOREINFO_SYMBOL(_stext); 1579 VMCOREINFO_SYMBOL(_stext);
1580 VMCOREINFO_SYMBOL(vmlist); 1580 VMCOREINFO_SYMBOL(vmap_area_list);
1581 1581
1582#ifndef CONFIG_NEED_MULTIPLE_NODES 1582#ifndef CONFIG_NEED_MULTIPLE_NODES
1583 VMCOREINFO_SYMBOL(mem_map); 1583 VMCOREINFO_SYMBOL(mem_map);
diff --git a/mm/nommu.c b/mm/nommu.c
index e001768b14e8..2f1c75ed468e 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -228,8 +228,7 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
228} 228}
229EXPORT_SYMBOL(follow_pfn); 229EXPORT_SYMBOL(follow_pfn);
230 230
231DEFINE_RWLOCK(vmlist_lock); 231LIST_HEAD(vmap_area_list);
232struct vm_struct *vmlist;
233 232
234void vfree(const void *addr) 233void vfree(const void *addr)
235{ 234{
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index bda6cef5b97f..7e63984eb585 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -261,7 +261,8 @@ struct vmap_area {
261}; 261};
262 262
263static DEFINE_SPINLOCK(vmap_area_lock); 263static DEFINE_SPINLOCK(vmap_area_lock);
264static LIST_HEAD(vmap_area_list); 264/* Export for kexec only */
265LIST_HEAD(vmap_area_list);
265static struct rb_root vmap_area_root = RB_ROOT; 266static struct rb_root vmap_area_root = RB_ROOT;
266 267
267/* The vmap cache globals are protected by vmap_area_lock */ 268/* The vmap cache globals are protected by vmap_area_lock */
@@ -272,6 +273,10 @@ static unsigned long cached_align;
272 273
273static unsigned long vmap_area_pcpu_hole; 274static unsigned long vmap_area_pcpu_hole;
274 275
276/*** Old vmalloc interfaces ***/
277static DEFINE_RWLOCK(vmlist_lock);
278static struct vm_struct *vmlist;
279
275static struct vmap_area *__find_vmap_area(unsigned long addr) 280static struct vmap_area *__find_vmap_area(unsigned long addr)
276{ 281{
277 struct rb_node *n = vmap_area_root.rb_node; 282 struct rb_node *n = vmap_area_root.rb_node;
@@ -1283,10 +1288,6 @@ int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
1283} 1288}
1284EXPORT_SYMBOL_GPL(map_vm_area); 1289EXPORT_SYMBOL_GPL(map_vm_area);
1285 1290
1286/*** Old vmalloc interfaces ***/
1287DEFINE_RWLOCK(vmlist_lock);
1288struct vm_struct *vmlist;
1289
1290static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, 1291static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va,
1291 unsigned long flags, const void *caller) 1292 unsigned long flags, const void *caller)
1292{ 1293{