Re: [PATCH v3 1/2] dma-contiguous: Abstract dma_{alloc,free}_contiguous()
From: Nicolin Chen
Date: Wed May 29 2019 - 18:52:51 EST
Hi Nathan,
On Wed, May 29, 2019 at 11:35:46AM -0700, Nathan Chancellor wrote:
> This commit is causing boot failures in QEMU on x86_64 defconfig:
>
> https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/203825363
>
> Attached is a bisect log and a boot log with GCC (just to show it is not
> a compiler thing).
>
> My QEMU command line is:
>
> 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
>
> and the rootfs is available here:
>
> https://github.com/ClangBuiltLinux/continuous-integration/raw/master/images/x86_64/rootfs.ext4
Thanks for reporting the bug.
I am able to repro the issue with the given command and rootfs. The
problem is that x86_64 has CONFIG_DMA_CMA=n so the helper function
is blank on x86_64 while dma-direct should be platform independent.
A simple fix is to add alloc_pages_node() for !CONFIG_DMA_CMA. I'll
submit a fix soon -- need to figure out a good way though. It seems
that adding the fallback to the !CONFIG_DMA_CMA version would cause
some recipe errors when building the kernel...