diff options
author | Tejun Heo <teheo@novell.com> | 2009-12-10 08:43:16 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-18 14:05:35 -0800 |
commit | f0cc8412be0a164f9472f161dfd74fc1ca6ac284 (patch) | |
tree | 34d914fecd80065c0eef9f4686a4130e28e20405 /include | |
parent | f996ff1a936f66ea00ecc760ab19e5f663579278 (diff) |
vmalloc: conditionalize build of pcpu_get_vm_areas()
No matching upstream commit as it was resolved differently there.
pcpu_get_vm_areas() is used only when dynamic percpu allocator is used
by the architecture. In 2.6.32, ia64 doesn't use dynamic percpu
allocator and has a macro which makes pcpu_get_vm_areas() buggy via
local/global variable aliasing and triggers compile warning.
The problem is fixed in upstream and ia64 uses dynamic percpu
allocators, so the only left issue is inclusion of unnecessary code
and compile warning on ia64 on 2.6.32.
Don't build pcpu_get_vm_areas() if legacy percpu allocator is in use.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vmalloc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 227c2a585e4..3c123c35c94 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -115,9 +115,11 @@ extern rwlock_t vmlist_lock; extern struct vm_struct *vmlist; extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); +#ifndef CONFIG_HAVE_LEGACY_PER_CPU_AREA struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, const size_t *sizes, int nr_vms, size_t align, gfp_t gfp_mask); +#endif void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); |