Skip to contentSkip to conversation

vduse: drop depedencies for HAS_DMA and ARCH_HAS_DMA_OPS

PATCH In review Jason Wang 2 participants 3 messages Jul 18, 2025 – Jul 29, 2025 virtio core

lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 vduse: drop depedencies for HAS_DMA and ARCH_HAS_DMA_OPS

After commit c2dbb3fc2a97 ("vduse: switch to use virtio map API instead of DMA API"), vduse doesn't use DMA API. So we can safely drop the depedencies for HAS_DMA and ARCH_HAS_DMA_OPS.

---
 drivers/vdpa/Kconfig | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/vdpa/Kconfig +1 -7
index 559fb9d3271f..857cf288c876 100644
@@ -34,13 +34,7 @@ config VDPA_SIM_BLOCK
 
 config VDPA_USER
 	tristate "VDUSE (vDPA Device in Userspace) support"
-	depends on EVENTFD && MMU && HAS_DMA
-	#
-	# This driver incorrectly tries to override the dma_ops.  It should
-	# never have done that, but for now keep it working on architectures
-	# that use dma ops
-	#
-	depends on ARCH_HAS_DMA_OPS
+	depends on EVENTFD && MMU
 	select VHOST_IOTLB
 	select IOMMU_IOVA
 	help
Signature · 1 line
2.47.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jason Wang

After commit c2dbb3fc2a97 ("vduse: switch to use virtio map API instead of DMA API"), vduse doesn't use DMA API. So we can safely drop the depedencies for HAS_DMA and ARCH_HAS_DMA_OPS.

This should be at the end of the series that makes VDUSE not depend on DMA, isn't it? Or am I missing something?

Anyway,

Thanks!

Quoted 26 lines
---
 drivers/vdpa/Kconfig | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/vdpa/Kconfig +1 -8
index 559fb9d3271f..857cf288c876 100644
@@ -34,13 +34,7 @@ config VDPA_SIM_BLOCK
 
 config VDPA_USER
        tristate "VDUSE (vDPA Device in Userspace) support"
-       depends on EVENTFD && MMU && HAS_DMA
-       #
-       # This driver incorrectly tries to override the dma_ops.  It should
-       # never have done that, but for now keep it working on architectures
-       # that use dma ops
-       #
-       depends on ARCH_HAS_DMA_OPS
+       depends on EVENTFD && MMU
        select VHOST_IOTLB
        select IOMMU_IOVA
        help
--

2.47.3

author
#2 lore raw
Quoted 11 lines · Eugenio Perez Martin
Quoted 6 lines · Jason Wang

After commit c2dbb3fc2a97 ("vduse: switch to use virtio map API instead of DMA API"), vduse doesn't use DMA API. So we can safely drop the depedencies for HAS_DMA and ARCH_HAS_DMA_OPS.

This should be at the end of the series that makes VDUSE not depend on DMA, isn't it? Or am I missing something?

This is a fixup after Michael merges the series. But he spot some other issue (e.g losing the type safety of dma device), so the series were dropped from his tree.

I will work on a new version.

Quoted 6 lines

Anyway,

Thanks!

Thanks

Quoted 28 lines
Quoted 27 lines
---
 drivers/vdpa/Kconfig | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/vdpa/Kconfig +1 -8
index 559fb9d3271f..857cf288c876 100644
@@ -34,13 +34,7 @@ config VDPA_SIM_BLOCK
 
 config VDPA_USER
        tristate "VDUSE (vDPA Device in Userspace) support"
-       depends on EVENTFD && MMU && HAS_DMA
-       #
-       # This driver incorrectly tries to override the dma_ops.  It should
-       # never have done that, but for now keep it working on architectures
-       # that use dma ops
-       #
-       depends on ARCH_HAS_DMA_OPS
+       depends on EVENTFD && MMU
        select VHOST_IOTLB
        select IOMMU_IOVA
        help
--

2.47.3