summaryrefslogtreecommitdiff
path: root/arch/mips/loongson32
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2019-02-05 00:52:58 +0300
committerPaul Burton <paul.burton@mips.com>2019-02-05 00:58:07 +0300
commit9ae1f262cd482f9ff28d179883f9e281d578e6ec (patch)
tree96c41fc33e6a5363aa0a2550a107c33feb925030 /arch/mips/loongson32
parentafd375dc239e9685669325cd97340cd3bfc7dd00 (diff)
downloadlinux-9ae1f262cd482f9ff28d179883f9e281d578e6ec.tar.xz
MIPS: Don't select ARCH_HAS_SYNC_DMA_FOR_CPU when DMA is coherent
Commit f263f2a2c682 ("MIPS: Compile post DMA flush only when needed") pushed the selection of ARCH_HAS_SYNC_DMA_FOR_CPU down to various SYS_HAS_CPU_* Kconfig entries corresponding to CPUs for which cpu_needs_post_dma_flush() might return true, but unfortunately missed the fact that some of these CPUs can be used in configurations with DMA_NONCOHERENT=n. When this is the case the kernel build does not include our definition of arch_sync_dma_for_cpu() from arch/mips/mm/dma-noncoherent.c and the build fails with a link error. One example of this problem is ip27_defconfig: kernel/dma/direct.o: In function `dma_direct_sync_single_for_cpu': direct.c:(.text+0x6c): undefined reference to `arch_sync_dma_for_cpu' kernel/dma/direct.o: In function `dma_direct_sync_sg_for_cpu': direct.c:(.text+0x1f0): undefined reference to `arch_sync_dma_for_cpu' kernel/dma/direct.o: In function `dma_direct_alloc': direct.c:(.text+0xc20): undefined reference to `arch_dma_alloc' kernel/dma/direct.o: In function `dma_direct_free': direct.c:(.text+0xc3c): undefined reference to `arch_dma_free' make[1]: *** [Makefile:1021: vmlinux] Error 1 make: *** [Makefile:152: sub-make] Error 2 Fix this by selecting ARCH_HAS_SYNC_DMA_FOR_CPU only when DMA_NONCOHERENT is also selected. The SYS_HAS_CPU_BMIPS5000 case is left as-is because systems with that CPU always select DMA_NONCOHERENT anyway. Signed-off-by: Paul Burton <paul.burton@mips.com> Fixes: f263f2a2c682 ("MIPS: Compile post DMA flush only when needed")
Diffstat (limited to 'arch/mips/loongson32')
0 files changed, 0 insertions, 0 deletions