um: Use asm-generic/dma-mapping.h
authorJohannes Berg <johannes.berg@intel.com>
Mon, 28 Mar 2022 07:46:25 +0000 (09:46 +0200)
committerRichard Weinberger <richard@nod.at>
Fri, 27 May 2022 07:00:45 +0000 (09:00 +0200)
commit365719035526e8eda214a1cedb2e1c96e969a0d7
tree830f17a18aeb9b1fecdbaa8406d444b2209a31cf
parentb0cbccf4480bd251d7911e7fa1913e47769dc724
um: Use asm-generic/dma-mapping.h

If DMA (PCI over virtio) is enabled, then some drivers may
enable CONFIG_DMA_OPS as well, and then we pull in the x86
definition of get_arch_dma_ops(), which uses the dma_ops
symbol, which isn't defined.

Since we don't have real DMA ops nor any kind of IOMMU fix
this in the simplest possible way: pull in the asm-generic
file instead of inheriting the x86 one. It's not clear why
those drivers that do (e.g. VDPA) "select DMA_OPS", and if
they'd even work with this, but chances are nobody will be
wanting to do that anyway, so fixing the build failure is
good enough.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/Kbuild