Skip to contentSkip to conversation

udmabuf: add CONFIG_MMU dependency

PATCH In review Arnd Bergmann 3 participants 3 messages May 28, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 udmabuf: add CONFIG_MMU dependency

From: Arnd Bergmann <[email protected]>

There is no !CONFIG_MMU version of vmf_insert_pfn():

arm-linux-gnueabi-ld: drivers/dma-buf/udmabuf.o: in function `udmabuf_vm_fault':
udmabuf.c:(.text+0xaa): undefined reference to `vmf_insert_pfn'

Fixes f7254e043ff1 ("udmabuf: use vmf_insert_pfn and VM_PFNMAP for handling mmap")
---
 drivers/dma-buf/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/dma-buf/Kconfig +1 -0
index e4dc53a36428..b46eb8a552d7 100644
@@ -35,6 +35,7 @@ config UDMABUF
 	default n
 	depends on DMA_SHARED_BUFFER
 	depends on MEMFD_CREATE || COMPILE_TEST
+	depends on MMU
 	help
 	  A driver to let userspace turn memfd regions into dma-bufs.
 	  Qemu can use this to create host dmabufs for guest framebuffers.
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw

Am 28.05.24 um 15:31 schrieb Arnd Bergmann:

Quoted 18 lines

From: Arnd Bergmann <[email protected]>

There is no !CONFIG_MMU version of vmf_insert_pfn():

arm-linux-gnueabi-ld: drivers/dma-buf/udmabuf.o: in function `udmabuf_vm_fault':
udmabuf.c:(.text+0xaa): undefined reference to `vmf_insert_pfn'

Fixes f7254e043ff1 ("udmabuf: use vmf_insert_pfn and VM_PFNMAP for handling mmap")
---
  drivers/dma-buf/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/dma-buf/Kconfig +0 -0
index e4dc53a36428..b46eb8a552d7 100644

drivers/dma-buf/Kconfig config UDMABUF · line 41

Quoted 7 lines
drivers/dma-buf/Kconfig +1 -0
@@ -35,6 +35,7 @@ config UDMABUF
  	default n
  	depends on DMA_SHARED_BUFFER
  	depends on MEMFD_CREATE || COMPILE_TEST
+	depends on MMU
  	help
  	  A driver to let userspace turn memfd regions into dma-bufs.
  	  Qemu can use this to create host dmabufs for guest framebuffers.
Signature · 3 lines
Thanks,

David / dhildenb
Acked-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 20 lines

From: Arnd Bergmann <[email protected]>

There is no !CONFIG_MMU version of vmf_insert_pfn():

arm-linux-gnueabi-ld: drivers/dma-buf/udmabuf.o: in function `udmabuf_vm_fault':
udmabuf.c:(.text+0xaa): undefined reference to `vmf_insert_pfn'

Fixes f7254e043ff1 ("udmabuf: use vmf_insert_pfn and VM_PFNMAP for

handling mmap")

---
 drivers/dma-buf/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/dma-buf/Kconfig +0 -0
index e4dc53a36428..b46eb8a552d7 100644

drivers/dma-buf/Kconfig config UDMABUF · line 38

Quoted 4 lines
drivers/dma-buf/Kconfig +1 -0
@@ -35,6 +35,7 @@ config UDMABUF
 	default n
 	depends on DMA_SHARED_BUFFER
 	depends on MEMFD_CREATE || COMPILE_TEST
+	depends on MMU

Thank you for the fix!

Quoted 6 lines
drivers/dma-buf/Kconfig +0 -1
 	help
 	  A driver to let userspace turn memfd regions into dma-bufs.
 	  Qemu can use this to create host dmabufs for guest framebuffers.
--

2.39.2