aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
authorSteve Capper <steve.capper@arm.com>2012-11-27 11:49:22 +0000
committerAndrey Konovalov <andrey.konovalov@linaro.org>2013-02-28 17:24:59 +0400
commite0ef4c9cba331890515ca58c516deb0d02a0dbff (patch)
tree98de355c328c7f712cf68966e584f525ab50f830 /arch/arm/mm/init.c
parent273483c7f4ea187dea5cc7ad53156cd55d309233 (diff)
ARM: mm: Add discontiguous memory support.
This patch adds support for discontiguous memory, with a view to each discontiguous block being assigned to a NUMA node (in a future patch). Discontiguous memory should only be used to back NUMA on systems where sparse memory is not available. Signed-off-by: Steve Capper <steve.capper@arm.com>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 08284cfa219c..67c6c31bcb8a 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -33,6 +33,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <asm/mmzone.h>
#include "mm.h"
@@ -179,6 +180,12 @@ static void __init arm_bootmem_init(unsigned long start_pfn,
pg_data_t *pgdat;
/*
+ * If we have NUMA or discontiguous memory, allocate the required
+ * nodes by reserving memblocks.
+ */
+ arm_numa_alloc_nodes(end_pfn);
+
+ /*
* Allocate the bootmem bitmap page. This must be in a region
* of memory which has already been mapped.
*/
@@ -621,7 +628,9 @@ void __init mem_init(void)
extern u32 itcm_end;
#endif
+#ifdef CONFIG_FLATMEM
max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
+#endif
/* this will put all unused low memory onto the freelists */
free_unused_memmap(&meminfo);