summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTang Chen <tangchen@cn.fujitsu.com>2013-02-07 12:26:35 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-02-14 15:25:23 +1100
commit3f5daf114f707a9ca1897fee2ae7451b716afda0 (patch)
treee099200d741fc453088be0098bb2966f8ea54562 /include/linux
parenta8bc2b5150b55969a7e7044883025edd3f314525 (diff)
page_alloc: add movable_memmap kernel parameter
Add functions to parse movablecore_map boot option. Since the option could be specified more then once, all the maps will be stored in the global variable movablecore_map.map array. And also, we keep the array in monotonic increasing order by start_pfn. And merge all overlapped ranges. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Reviewed-by: Wen Congyang <wency@cn.fujitsu.com> Tested-by: Lin Feng <linfeng@cn.fujitsu.com> Cc: Wu Jianguo <wujianguo@huawei.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 5ca9b9a588e1..1c1065dbd0a2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1361,6 +1361,17 @@ extern void free_bootmem_with_active_regions(int nid,
unsigned long max_low_pfn);
extern void sparse_memory_present_with_active_regions(int nid);
+#define MOVABLECORE_MAP_MAX MAX_NUMNODES
+struct movablecore_entry {
+ unsigned long start_pfn; /* start pfn of memory segment */
+ unsigned long end_pfn; /* end pfn of memory segment */
+};
+
+struct movablecore_map {
+ int nr_map;
+ struct movablecore_entry map[MOVABLECORE_MAP_MAX];
+};
+
#endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
#if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \