diff --git a/[refs] b/[refs] index 18fbb48774d6..cbea7a6128a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37d8d4bf489e39eedc9537f8616fe87879b13cb0 +refs/heads/master: 25818f0f288cd5333ba5a90ad6dde3def4c4ff58 diff --git a/trunk/include/linux/memblock.h b/trunk/include/linux/memblock.h index 1a9c29cc92fa..dfa64494ced1 100644 --- a/trunk/include/linux/memblock.h +++ b/trunk/include/linux/memblock.h @@ -19,7 +19,7 @@ #include #define INIT_MEMBLOCK_REGIONS 128 -#define MEMBLOCK_ERROR (~(phys_addr_t)0) +#define MEMBLOCK_ERROR 0 struct memblock_region { phys_addr_t base; diff --git a/trunk/mm/memblock.c b/trunk/mm/memblock.c index 85cfa1d3ab28..cb520df2a414 100644 --- a/trunk/mm/memblock.c +++ b/trunk/mm/memblock.c @@ -105,6 +105,12 @@ static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t en phys_addr_t base, res_base; long j; + /* Prevent allocations returning 0 as it's also used to + * indicate an allocation failure + */ + if (start == 0) + start = PAGE_SIZE; + base = memblock_align_down((end - size), align); while (start <= base) { j = memblock_overlaps_region(&memblock.reserved, base, size);