lkml.org 
[lkml]   [2017]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Introduce dmam_zalloc_coherent()
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.

\
 
 \ /
  Last update: 2017-08-09 15:37    [W:0.417 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site