On 03/06/2013 04:07 PM, Yinghai Lu wrote:
>>
>>  mm/memblock.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff -puN mm/memblock.c~memblock-add-assertion-for-zero-allocation-alignment 
>> mm/memblock.c
>> --- a/mm/memblock.c~memblock-add-assertion-for-zero-allocation-alignment
>> +++ a/mm/memblock.c
>> @@ -771,6 +771,9 @@ static phys_addr_t __init memblock_alloc
>>  {
>>         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);
> 
> Hi, Peter,
> 
> Do you agree that we should check align in round_up()?
> 

Not in round_up(), that is used in way too many places.  Doing it in
memblock_alloc() might make sense.

        -hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to