mm: cma_alloc: allow to specify GFP mask
Most users of this interface just want to use it with the default GFP_KERNEL flags, but for cases where DMA memory is allocated it may be called from a different context. No functional change yet, just passing through the flag to the underlying alloc_contig_range function. Link: http://lkml.kernel.org/r/20170127172328.18574-2-l.stach@pengutronix.de Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Radim Krcmar <rkrcmar@redhat.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Chris Zankel <chris@zankel.net> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Alexander Graf <agraf@suse.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
ca96b62534
commit
e2f466e32f
@@ -138,7 +138,7 @@ static int cma_alloc_mem(struct cma *cma, int count)
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
|
||||
p = cma_alloc(cma, count, 0);
|
||||
p = cma_alloc(cma, count, 0, GFP_KERNEL);
|
||||
if (!p) {
|
||||
kfree(mem);
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user