summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-02-08 10:27:37 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-02-09 21:53:04 +1100
commitb7931da3f18b7580e3f1f35105547c15e4de3d9a (patch)
tree0d3096daa3b4c02a0721532d277a2c2914c27ade /drivers/base
parent7e487b51b3e6b8de4aa64f7d399ebc91c3d92906 (diff)
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/dma-contiguous.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
index e167a1e1bccb..d1a9cbabc627 100644
--- a/drivers/base/dma-contiguous.c
+++ b/drivers/base/dma-contiguous.c
@@ -193,7 +193,7 @@ struct page *dma_alloc_from_contiguous(struct device *dev, size_t count,
if (align > CONFIG_CMA_ALIGNMENT)
align = CONFIG_CMA_ALIGNMENT;
- return cma_alloc(dev_get_cma_area(dev), count, align);
+ return cma_alloc(dev_get_cma_area(dev), count, align, GFP_KERNEL);
}
/**