dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages
authorChristoph Hellwig <hch@lst.de>
Sat, 23 Apr 2022 17:20:24 +0000 (19:20 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 11 May 2022 17:48:34 +0000 (19:48 +0200)
commit92826e967535db2eb117db227b1191aaf98e4bb3
tree2fb3ee8b76f889d97696455041fdc031f871d9ed
parent566fb90e050dfa2132340bbdab9533b727dda6f1
dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages

When dma_direct_alloc_pages encounters a highmem page it just gives up
currently.  But what we really should do is to try memory using the
page allocator instead - without this platforms with a global highmem
CMA pool will fail all dma_alloc_pages allocations.

Fixes: efa70f2fdc84 ("dma-mapping: add a new dma_alloc_pages API")
Reported-by: Mark O'Neill <mao@tumblingdice.co.uk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/direct.c