OSDN Git Service

dma-direct: retry allocations using GFP_DMA for small masks
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Jan 2018 22:40:57 +0000 (23:40 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 15 Jan 2018 08:35:13 +0000 (09:35 +0100)
commit95f183916d4b0bc1943684948ecdd2469f1aa978
tree4f35e71033398e1ac96e90454a84f1ad2402492e
parentc61e9637340e1d0672c6f0c0b11aa81d7262c49d
dma-direct: retry allocations using GFP_DMA for small masks

If an attempt to allocate memory succeeded, but isn't inside the
supported DMA mask, retry the allocation with GFP_DMA set as a
last resort.

Based on the x86 code, but an off by one error in what is now
dma_coherent_ok has been fixed vs the x86 code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
lib/dma-direct.c