mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
mm: add HAVE_MEMBLOCK_NODE_MAP support
ARCH_POPULATES_NODE_MAP in 3.0 is replaced by HAVE_MEMBLOCK_NODE_MAP in
3.4. add_active_range() is replaced with memblock_set_node(). They do
basically the same thing, but embedding nid field into memblock_region
is much cleaner than a separate early_node_map.
HAVE_MEMBLOCK_NODE_MAP is not selected by default.
See commit 4a2164a7db
for more info.
Change-Id: Icb44a8cea365b2d32df80628a57535a3d46fbd55
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
parent
06bd32b064
commit
6b71c52fea
2 changed files with 5 additions and 8 deletions
|
@ -1805,9 +1805,6 @@ config ARCH_MEMORY_PROBE
|
|||
config ARCH_MEMORY_REMOVE
|
||||
def_bool n
|
||||
|
||||
config ARCH_POPULATES_NODE_MAP
|
||||
def_bool n
|
||||
|
||||
config ENABLE_DMM
|
||||
def_bool n
|
||||
|
||||
|
|
|
@ -250,8 +250,8 @@ void __init setup_dma_zone(struct machine_desc *mdesc)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
|
||||
static void __init arm_bootmem_free_apnm(unsigned long max_low,
|
||||
#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
|
||||
static void __init arm_bootmem_free_hmnm(unsigned long max_low,
|
||||
unsigned long max_high)
|
||||
{
|
||||
unsigned long max_zone_pfns[MAX_NR_ZONES];
|
||||
|
@ -267,7 +267,7 @@ static void __init arm_bootmem_free_apnm(unsigned long max_low,
|
|||
unsigned long start = memblock_region_memory_base_pfn(reg);
|
||||
unsigned long end = memblock_region_memory_end_pfn(reg);
|
||||
|
||||
add_active_range(0, start, end);
|
||||
memblock_set_node(PFN_PHYS(start), PFN_PHYS(end - start), 0);
|
||||
}
|
||||
free_area_init_nodes(max_zone_pfns);
|
||||
}
|
||||
|
@ -491,8 +491,8 @@ void __init bootmem_init(void)
|
|||
*/
|
||||
sparse_init();
|
||||
|
||||
#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
|
||||
arm_bootmem_free_apnm(max_low, max_high);
|
||||
#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
|
||||
arm_bootmem_free_hmnm(max_low, max_high);
|
||||
#else
|
||||
/*
|
||||
* Now free the memory - free_area_init_node needs
|
||||
|
|
Loading…
Reference in a new issue