aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/bootmem.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 9b134460b016..2058cb7595f2 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -303,7 +303,14 @@ unsigned long __init free_all_bootmem_node(pg_data_t *pgdat)
303unsigned long __init free_all_bootmem(void) 303unsigned long __init free_all_bootmem(void)
304{ 304{
305#ifdef CONFIG_NO_BOOTMEM 305#ifdef CONFIG_NO_BOOTMEM
306 return free_all_memory_core_early(NODE_DATA(0)->node_id); 306 /*
307 * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id
308 * because in some case like Node0 doesnt have RAM installed
309 * low ram will be on Node1
310 * Use MAX_NUMNODES will make sure all ranges in early_node_map[]
311 * will be used instead of only Node0 related
312 */
313 return free_all_memory_core_early(MAX_NUMNODES);
307#else 314#else
308 return free_all_bootmem_core(NODE_DATA(0)->bdata); 315 return free_all_bootmem_core(NODE_DATA(0)->bdata);
309#endif 316#endif