dma-pool: make sure atomic pool suits device
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tue, 14 Jul 2020 12:39:28 +0000 (14:39 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 14 Jul 2020 13:42:33 +0000 (15:42 +0200)
commit81e9d894e03f9a279102c7aac62ea7cbf9949f4b
tree818b39991fbd21fc5655138031296d43d2c682f0
parent48b6703858dd5526c82d8ff2dbac59acab3a9dda
dma-pool: make sure atomic pool suits device

When allocating DMA memory from a pool, the core can only guess which
atomic pool will fit a device's constraints. If it doesn't, get a safer
atomic pool and try again.

Fixes: c84dc6e68a1d ("dma-pool: add additional coherent pools to map to gfp mask")
Reported-by: Jeremy Linton <jeremy.linton@arm.com>
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/pool.c