All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: akpm@linux-foundation.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mm-commits@vger.kernel.org, Vineet.Gupta1@synopsys.com,
	liwanp@linux.vnet.ibm.com, mingo@kernel.org, tj@kernel.org,
	vgupta@synopsys.com
Subject: Re: + memblock-add-assertion-for-zero-allocation-alignment.patch added to -mm tree
Date: Wed, 06 Mar 2013 17:03:53 -0800	[thread overview]
Message-ID: <5137E779.5050904@zytor.com> (raw)
In-Reply-To: <CAE9FiQVAnR08U=ywUzk_4fkSh_mz6sZqtwWg02YzzF_cbN45rQ@mail.gmail.com>

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


      parent reply	other threads:[~2013-03-07  1:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 22:44 + memblock-add-assertion-for-zero-allocation-alignment.patch added to -mm tree akpm
2013-03-07  0:07 ` Yinghai Lu
2013-03-07  0:16   ` Andrew Morton
2013-03-07  1:03   ` H. Peter Anvin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5137E779.5050904@zytor.com \
    --to=hpa@zytor.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwanp@linux.vnet.ibm.com \
    --cc=mingo@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgupta@synopsys.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.