X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fmemblock.c;h=c5fad932fa51df4a17555374de181302fd8f5386;hb=45465c5e592fa86466173b7eab83730e9d3fe041;hp=b8d9147e5c084de3264fc49ea93c95e22eddf49d;hpb=831bbbeb2b0341a82a464896be49493c104d78f0;p=~andy%2Flinux diff --git a/mm/memblock.c b/mm/memblock.c index b8d9147e5c0..c5fad932fa5 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -322,10 +322,11 @@ static void __init_memblock memblock_merge_regions(struct memblock_type *type) /** * memblock_insert_region - insert new memblock region - * @type: memblock type to insert into - * @idx: index for the insertion point - * @base: base address of the new region - * @size: size of the new region + * @type: memblock type to insert into + * @idx: index for the insertion point + * @base: base address of the new region + * @size: size of the new region + * @nid: node id of the new region * * Insert new memblock region [@base,@base+@size) into @type at @idx. * @type must already have extra room to accomodate the new region. @@ -771,6 +772,9 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size, { phys_addr_t found; + if (WARN_ON(!align)) + align = __alignof__(long long); + /* align @size to avoid excessive fragmentation on reserved array */ size = round_up(size, align);