From: Christoph Hellwig <hch@lst.de>
To: Michael Moese <michael.moese@men.de>
Cc: Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Introduce dmam_zalloc_coherent()
Date: Wed, 9 Aug 2017 15:37:05 +0200 [thread overview]
Message-ID: <20170809133705.GA25491@lst.de> (raw)
In-Reply-To: <20170808091535.31371-1-michael.moese@men.de>
On Tue, Aug 08, 2017 at 11:15:35AM +0200, Michael Moese wrote:
> All memory allocation functions have a pendant for allocating zeroed
> memory, but dmam_alloc_coherent does not have such a pendant.
> However, it is easier to read dmam_zalloc_coherent than passing an extra
> flag or, even worse, see memset() after the allocation.
> This patch adds an inline function dmam_zalloc_coherent(), exactly like
> the implementation of dma_zalloc_coherent().
I'm a bit worried about the __GFP_ZERO as we have lots of non-kmalloc
implementations of these. But on the other hand we already implement
dma_zalloc_coherent the same way, which means we'd already buggy.
So I plan to apply this for 4.14, but I also plan to spend some time
to implement all the existin alloc ops to make sure it's going to work
fine.
next prev parent reply other threads:[~2017-08-09 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 9:15 [PATCH] Introduce dmam_zalloc_coherent() Michael Moese
2017-08-09 13:37 ` Christoph Hellwig [this message]
2017-08-10 6:58 ` Marek Szyprowski
2017-08-09 17:44 ` kbuild test robot
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=20170809133705.GA25491@lst.de \
--to=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=michael.moese@men.de \
--cc=robin.murphy@arm.com \
/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.