]> git.baikalelectronics.ru Git - kernel.git/commit
bootmem: clean up arch-specific bootmem wrapping
authorTejun Heo <tj@kernel.org>
Tue, 24 Feb 2009 02:57:20 +0000 (11:57 +0900)
committerTejun Heo <tj@kernel.org>
Tue, 24 Feb 2009 02:57:20 +0000 (11:57 +0900)
commit732e77d5e7ac29748d9df5ae75d2e835dac88e00
tree0f93037ff2ebbdc321ebd0bbfc4752823c8d6a0e
parent46d9ed0760fde7a657f18e9abec8c525154393ba
bootmem: clean up arch-specific bootmem wrapping

Impact: cleaner and consistent bootmem wrapping

By setting CONFIG_HAVE_ARCH_BOOTMEM_NODE, archs can define
arch-specific wrappers for bootmem allocation.  However, this is done
a bit strangely in that only the high level convenience macros can be
changed while lower level, but still exported, interface functions
can't be wrapped.  This not only is messy but also leads to strange
situation where alloc_bootmem() does what the arch wants it to do but
the equivalent __alloc_bootmem() call doesn't although they should be
able to be used interchangeably.

This patch updates bootmem such that archs can override / wrap the
backend function - alloc_bootmem_core() instead of the highlevel
interface functions to allow simpler and consistent wrapping.  Also,
HAVE_ARCH_BOOTMEM_NODE is renamed to HAVE_ARCH_BOOTMEM.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Johannes Weiner <hannes@saeurebad.de>
arch/avr32/Kconfig
arch/x86/Kconfig
arch/x86/include/asm/mmzone_32.h
include/linux/bootmem.h
mm/bootmem.c