]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:24:26 +0000 (09:24 +0200)
commit31ed0de4a626d5ba2713adb39e4a8cd862047f25
treeddb9a2f68cc66e065fb18674a878e74f3b6b1bca
parentebd9620ded85a96caf221669ccbae161d3722ffb
dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages

BugLink: https://bugs.launchpad.net/bugs/1981864
[ Upstream commit 92826e967535db2eb117db227b1191aaf98e4bb3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/dma/direct.c