diff options
| author | Nicolin Chen <[email protected]> | 2019-05-30 00:54:25 +0000 |
|---|---|---|
| committer | Christoph Hellwig <[email protected]> | 2019-06-03 14:00:07 +0000 |
| commit | dd3dcede9fa0a0b661ac1f24843f4a1b1317fdb6 (patch) | |
| tree | 6961ded5706cd650a068427be37092723010568e /lib/genalloc.c | |
| parent | dma-contiguous: use fallback alloc_pages for single pages (diff) | |
| download | kernel-dd3dcede9fa0a0b661ac1f24843f4a1b1317fdb6.tar.gz kernel-dd3dcede9fa0a0b661ac1f24843f4a1b1317fdb6.zip | |
dma-contiguous: fix !CONFIG_DMA_CMA version of dma_{alloc, free}_contiguous()
Commit fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous()
helpers") adds a pair of new helper functions so as to abstract code in
the dma-direct (and other places in the future), however it breaks QEMU
boot feature using x86_64 defconfig.
That's because x86_64 defconfig has CONFIG_DMA_CMA=n so those two newly
introduced helper functions are empty in their !CONFIG_DMA_CMA version,
while previously the platform independent dma-direct code had fallback
alloc_pages_node() and __free_pages().
So this patch fixes it by adding alloc_pages_node() and __free_pages()
in the !CONFIG_DMA_CMA version of the two helper functions.
Tested with below QEMU command:
qemu-system-x86_64 -m 512m \
-drive file=images/x86_64/rootfs.ext4,format=raw,if=ide \
-append 'console=ttyS0 root=/dev/sda' -nographic \
-kernel arch/x86_64/boot/bzImage
with the rootfs from the below link:
https://github.com/ClangBuiltLinux/continuous-integration/raw/master/images/x86_64/rootfs.ext4
Fixes: fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers")
Reported-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions
