vmalloc: conditionalize build of pcpu_get_vm_areas()
commitf0cc8412be0a164f9472f161dfd74fc1ca6ac284
authorTejun Heo <teheo@novell.com>
Wed, 9 Dec 2009 23:43:16 +0000 (10 08:43 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:35 +0000 (18 14:05 -0800)
tree34d914fecd80065c0eef9f4686a4130e28e20405
parentf996ff1a936f66ea00ecc760ab19e5f663579278
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>
include/linux/vmalloc.h
mm/vmalloc.c