diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7ea9a003ad57..a7381be21320 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -203,7 +203,10 @@ static unsigned long __meminitdata dma_reserve; | |||
203 | 203 | ||
204 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 204 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
205 | /* Movable memory ranges, will also be used by memblock subsystem. */ | 205 | /* Movable memory ranges, will also be used by memblock subsystem. */ |
206 | struct movablemem_map movablemem_map; | 206 | struct movablemem_map movablemem_map = { |
207 | .acpi = false, | ||
208 | .nr_map = 0, | ||
209 | }; | ||
207 | 210 | ||
208 | static unsigned long __meminitdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES]; | 211 | static unsigned long __meminitdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES]; |
209 | static unsigned long __meminitdata arch_zone_highest_possible_pfn[MAX_NR_ZONES]; | 212 | static unsigned long __meminitdata arch_zone_highest_possible_pfn[MAX_NR_ZONES]; |
@@ -5314,6 +5317,23 @@ static int __init cmdline_parse_movablemem_map(char *p) | |||
5314 | if (!p) | 5317 | if (!p) |
5315 | goto err; | 5318 | goto err; |
5316 | 5319 | ||
5320 | if (!strcmp(p, "acpi")) | ||
5321 | movablemem_map.acpi = true; | ||
5322 | |||
5323 | /* | ||
5324 | * If user decide to use info from BIOS, all the other user specified | ||
5325 | * ranges will be ingored. | ||
5326 | */ | ||
5327 | if (movablemem_map.acpi) { | ||
5328 | if (movablemem_map.nr_map) { | ||
5329 | memset(movablemem_map.map, 0, | ||
5330 | sizeof(struct movablemem_entry) | ||
5331 | * movablemem_map.nr_map); | ||
5332 | movablemem_map.nr_map = 0; | ||
5333 | } | ||
5334 | return 0; | ||
5335 | } | ||
5336 | |||
5317 | oldp = p; | 5337 | oldp = p; |
5318 | mem_size = memparse(p, &p); | 5338 | mem_size = memparse(p, &p); |
5319 | if (p == oldp) | 5339 | if (p == oldp) |