aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memblock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 85cfa1d3ab28..cb520df2a414 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -105,6 +105,12 @@ static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t en
105 phys_addr_t base, res_base; 105 phys_addr_t base, res_base;
106 long j; 106 long j;
107 107
108 /* Prevent allocations returning 0 as it's also used to
109 * indicate an allocation failure
110 */
111 if (start == 0)
112 start = PAGE_SIZE;
113
108 base = memblock_align_down((end - size), align); 114 base = memblock_align_down((end - size), align);
109 while (start <= base) { 115 while (start <= base) {
110 j = memblock_overlaps_region(&memblock.reserved, base, size); 116 j = memblock_overlaps_region(&memblock.reserved, base, size);