Skip to content

Commit

Permalink
memblock: Make memblock_alloc_try_nid() fallback to MEMBLOCK_ALLOC_AN…
Browse files Browse the repository at this point in the history
…YWHERE

memblock_alloc_nid() used to fallback to allocating anywhere by using
memblock_alloc() as a fallback.

However, some of my previous patches limit memblock_alloc() to the region
covered by MEMBLOCK_ALLOC_ACCESSIBLE which is not quite what we want
for memblock_alloc_try_nid().

So we fix it by explicitely using MEMBLOCK_ALLOC_ANYWHERE.

Not that so far only sparc uses memblock_alloc_nid() and it hasn't been updated
to clamp the accessible zone yet. Thus the temporary "breakage" should have
no effect.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Aug 5, 2010
1 parent 9d1e249 commit 918fe8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, i

if (res)
return res;
return memblock_alloc(size, align);
return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE);
}


Expand Down

0 comments on commit 918fe8d

Please sign in to comment.