Commit 4f8b02b4e5c6896e073bed736136d420bd44b627
1 parent
d56557af19
Exists in
master
and in
20 other branches
vmalloc: pcpu_get/free_vm_areas() aren't needed on UP
These functions are used only by percpu memory allocator on SMP. Don't build them on UP. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Nick Piggin <npiggin@kernel.dk> Reviewed-by: Chrsitoph Lameter <cl@linux.com>
Showing 2 changed files with 4 additions and 0 deletions Side-by-side Diff
include/linux/vmalloc.h
... | ... | @@ -117,11 +117,13 @@ |
117 | 117 | extern struct vm_struct *vmlist; |
118 | 118 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
119 | 119 | |
120 | +#ifdef CONFIG_SMP | |
120 | 121 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, |
121 | 122 | const size_t *sizes, int nr_vms, |
122 | 123 | size_t align, gfp_t gfp_mask); |
123 | 124 | |
124 | 125 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); |
126 | +#endif | |
125 | 127 | |
126 | 128 | #endif /* _LINUX_VMALLOC_H */ |
mm/vmalloc.c
... | ... | @@ -2056,6 +2056,7 @@ |
2056 | 2056 | } |
2057 | 2057 | EXPORT_SYMBOL_GPL(free_vm_area); |
2058 | 2058 | |
2059 | +#ifdef CONFIG_SMP | |
2059 | 2060 | static struct vmap_area *node_to_va(struct rb_node *n) |
2060 | 2061 | { |
2061 | 2062 | return n ? rb_entry(n, struct vmap_area, rb_node) : NULL; |
... | ... | @@ -2336,6 +2337,7 @@ |
2336 | 2337 | free_vm_area(vms[i]); |
2337 | 2338 | kfree(vms); |
2338 | 2339 | } |
2340 | +#endif /* CONFIG_SMP */ | |
2339 | 2341 | |
2340 | 2342 | #ifdef CONFIG_PROC_FS |
2341 | 2343 | static void *s_start(struct seq_file *m, loff_t *pos) |