aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze/mm
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-12-15 15:47:16 +0100
committerMichal Simek <monstr@monstr.eu>2012-03-23 09:28:13 +0100
commitbaab8a828d2d6b5b073c192ebe777514bbf3c831 (patch)
treeda9cf80b749b1470e5b408cd0e1ae69494b9e6a1 /arch/microblaze/mm
parent832997990ab912ab8ed4ade08cb6ac5f471efa1e (diff)
downloadvexpress-lsk-baab8a828d2d6b5b073c192ebe777514bbf3c831.tar.gz
microblaze: Use active regions
Register lowmem active regions. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r--arch/microblaze/mm/init.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index cbcdf24b1c8..43b3f604baf 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -68,7 +68,8 @@ static void __init paging_init(void)
zones_size[ZONE_DMA] = max_pfn;
- free_area_init(zones_size);
+ /* We don't have holes in memory map */
+ free_area_init_nodes(zones_size);
}
void __init setup_memory(void)
@@ -142,8 +143,18 @@ void __init setup_memory(void)
PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn);
memblock_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size);
+ /* Add active regions with valid PFNs */
+ for_each_memblock(memory, reg) {
+ unsigned long start_pfn, end_pfn;
+
+ start_pfn = memblock_region_memory_base_pfn(reg);
+ end_pfn = memblock_region_memory_end_pfn(reg);
+ memblock_set_node(start_pfn << PAGE_SHIFT,
+ (end_pfn - start_pfn) << PAGE_SHIFT, 0);
+ }
+
/* free bootmem is whole main memory */
- free_bootmem(memory_start, lowmem_size);
+ free_bootmem_with_active_regions(0, max_low_pfn);
/* reserve allocate blocks */
for_each_memblock(reserved, reg) {
@@ -162,6 +173,9 @@ void __init setup_memory(void)
}
}
+ /* XXX need to clip this if using highmem? */
+ sparse_memory_present_with_active_regions(0);
+
#ifdef CONFIG_MMU
init_bootmem_done = 1;
#endif