diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-13 13:32:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 13:32:07 -0700 |
commit | 3423166fdbc2444bf3a4a27af1d7508364a17be7 (patch) | |
tree | 0a42bd5fbe6bcca79802bf1ec5af6acf12aadd82 /mm/memblock.c | |
parent | e9b57cca3dbdc7a0b90514af8bf613baf97105a5 (diff) | |
parent | 7d93101fc71ec47c7cc66ac99f76ef795c5207aa (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 77b5f227e1d8..99f285599501 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -99,9 +99,6 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start, phys_addr_t this_start, this_end, cand; u64 i; - /* align @size to avoid excessive fragmentation on reserved array */ - size = round_up(size, align); - /* pump up @end */ if (end == MEMBLOCK_ALLOC_ACCESSIBLE) end = memblock.current_limit; @@ -731,6 +728,9 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size, { phys_addr_t found; + /* align @size to avoid excessive fragmentation on reserved array */ + size = round_up(size, align); + found = memblock_find_in_range_node(0, max_addr, size, align, nid); if (found && !memblock_reserve(found, size)) return found; |