dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Jan 2018 22:39:03 +0000 (23:39 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 15 Jan 2018 08:35:12 +0000 (09:35 +0100)
commitc61e9637340e1d0672c6f0c0b11aa81d7262c49d
tree2e38215dba2ec8b18ac7f89e4a24c0a0b7da7b52
parent21f237e4d08511eb662b59d8ff1b64be68e0c2bc
dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32

This allows to dip into zones for lower memory if they are available.
If one of the zones is not available the corresponding GFP_* flag
will evaluate to 0 so they won't change anything.  We provide an
arch tunable for those architectures that do not use GFP_DMA for
the lowest 24-bits, given that there are a few.

Roughly based on the x86 code.

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