From 57e845eccecf0618a5739c85b246419a21bc4435 Mon Sep 17 00:00:00 2001 From: Liam Mark Date: Wed, 16 Mar 2016 15:31:48 -0700 Subject: arm64: mm: dma: panic on dummy dma alloc On the 4.4 kernel non platform devices now have to call arch_setup_dma_ops to setup their dma ops otherwise the dummy dma opts will be used. This because of change the following change: 1dccb59 arm64: simplify dma_get_ops Introduce a panic if a the dummy dma alloc is used to help clients more easily identify why their dma allocations are failing. This patch can later be reverted once all non platform devices have fixed their code. Change-Id: I2dd7eb0694c8c403da21133601eb7e831ead2dfd Signed-off-by: Liam Mark --- arch/arm64/mm/dma-mapping.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index ebd78f5de4c4..8a924233b9b7 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -541,6 +541,7 @@ static void *__dummy_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags, struct dma_attrs *attrs) { + WARN(1, "dma alloc failure, device may be missing a call to arch_setup_dma_ops"); return NULL; } -- cgit v1.2.3