diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 68319dd20bed..9bd339eb04c6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3634,6 +3634,9 @@ void * __init __alloc_memory_core_early(int nid, u64 size, u64 align, | |||
3634 | int i; | 3634 | int i; |
3635 | void *ptr; | 3635 | void *ptr; |
3636 | 3636 | ||
3637 | if (limit > get_max_mapped()) | ||
3638 | limit = get_max_mapped(); | ||
3639 | |||
3637 | /* need to go over early_node_map to find out good range for node */ | 3640 | /* need to go over early_node_map to find out good range for node */ |
3638 | for_each_active_range_index_in_nid(i, nid) { | 3641 | for_each_active_range_index_in_nid(i, nid) { |
3639 | u64 addr; | 3642 | u64 addr; |