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 <lmark@codeaurora.org>
This commit is contained in:
Liam Mark 2016-03-16 15:31:48 -07:00 committed by David Keitel
parent a5de38c2c5
commit 57e845ecce

View file

@ -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;
}