X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=mm%2Fmemblock.c;h=c5fad932fa51df4a17555374de181302fd8f5386;hb=209ff86d61d6b50979cffb47878fc77ca2f6c8a2;hp=b8d9147e5c084de3264fc49ea93c95e22eddf49d;hpb=a36b32402a805033beed752ea85c5ed62586fe35;p=deliverable%2Flinux.git diff --git a/mm/memblock.c b/mm/memblock.c index b8d9147e5c08..c5fad932fa51 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);