LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Miles MH Chen <orca.chen@gmail.com>
Cc: Will Deacon <Will.Deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Remove GFP_DMA and GFP_DMA32 from flags before passing it into kmalloc.
Date: Sat, 27 Sep 2014 16:13:28 +0100	[thread overview]
Message-ID: <983713E2-1EBC-45CC-8212-20FBFAA9AC0B@arm.com> (raw)
In-Reply-To: <CAHkaATRAuo=Mh1tmMVDxnWeO8ARjW+KBfHNLpaFG3XxN5uY-hQ@mail.gmail.com>

On 27 Sep 2014, at 16:09, Miles MH Chen <orca.chen@gmail.com> wrote:
> Signed-off-by: Min-Hua Chen <orca.chen@gmail.com>
> ---
>  arch/arm64/mm/dma-mapping.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> index 4164c5a..273cf6d 100644
> --- a/arch/arm64/mm/dma-mapping.c
> +++ b/arch/arm64/mm/dma-mapping.c
> @@ -103,7 +103,8 @@ static void *__dma_alloc_noncoherent(struct device *dev, size_t size,
>      ptr = __dma_alloc_coherent(dev, size, dma_handle, flags, attrs);
>      if (!ptr)
>          goto no_mem;
> -    map = kmalloc(sizeof(struct page *) << order, flags & ~GFP_DMA);
> +    map = kmalloc(sizeof(struct page *) << order,
> +                    flags & ~(GFP_DMA | GFP_DMA32));

Do you have an explanation on why this is needed (and such explanation
should also be included in the commit log)? We don’t use ZONE_DMA32 on
arm64 (we did initially but it was for the wrong reasons).

Thanks,

Catalin

       reply	other threads:[~2014-09-27 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHkaATRAuo=Mh1tmMVDxnWeO8ARjW+KBfHNLpaFG3XxN5uY-hQ@mail.gmail.com>
2014-09-27 15:13 ` Catalin Marinas [this message]
2014-09-28  0:44   ` Miles MH Chen
2014-12-08 17:48     ` Catalin Marinas

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=983713E2-1EBC-45CC-8212-20FBFAA9AC0B@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orca.chen@gmail.com \
    --subject='Re: [PATCH] Remove GFP_DMA and GFP_DMA32 from flags before passing it into kmalloc.' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).