linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] infiniband: add MMU dependency for user_mem
@ 2017-10-06  7:13 Arnd Bergmann
  2017-10-09 16:26 ` Doug Ledford
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-10-06  7:13 UTC (permalink / raw)
  To: Doug Ledford, Sean Hefty, Hal Rosenstock
  Cc: Arnd Bergmann, Yuval Shaia, linux-rdma, linux-kernel

The infiniband subsystem causes a link failure when the umem
driver is built on MMU-less systems:

mm/mmu_notifier.o: In function `do_mmu_notifier_register':
mmu_notifier.c:(.text+0x32): undefined reference to `mm_take_all_locks'
drivers/infiniband/core/umem.o: In function `ib_umem_get':
umem.c:(.text+0x132): undefined reference to `can_do_mlock'
drivers/infiniband/core/umem_odp.o: In function `ib_umem_odp_map_dma_pages':
umem_odp.c:(.text+0x766): undefined reference to `get_user_pages_remote'

This bug has existed for a while but only become apparent in ARM
randconfig builds when the dependency on PCI was lifted, as none
of the ARM-NOMMU targets support PCI at the moment.

We could probably get the umem driver to build by providing an
alternative implementation 'can_do_mlock()' that returns false
on NOMMU-systems, but then we'd still have a problem with the
mmu-notifiers required by CONFIG_INFINIBAND_ON_DEMAND_PAGING,
so simply forbidding umem with NOMMU seems like the simplest
workaround.

Fixes: 931bc0d91639 ("IB: Move PCI dependency from root KConfig to HW's KConfigs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/infiniband/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index b62b3b1e09cd..98ac46ed7214 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -45,6 +45,7 @@ config INFINIBAND_EXP_USER_ACCESS
 config INFINIBAND_USER_MEM
 	bool
 	depends on INFINIBAND_USER_ACCESS != n
+	depends on MMU
 	default y
 
 config INFINIBAND_ON_DEMAND_PAGING
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] infiniband: add MMU dependency for user_mem
  2017-10-06  7:13 [PATCH] infiniband: add MMU dependency for user_mem Arnd Bergmann
@ 2017-10-09 16:26 ` Doug Ledford
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2017-10-09 16:26 UTC (permalink / raw)
  To: Arnd Bergmann, Sean Hefty, Hal Rosenstock
  Cc: Yuval Shaia, linux-rdma, linux-kernel

On Fri, 2017-10-06 at 09:13 +0200, Arnd Bergmann wrote:
> The infiniband subsystem causes a link failure when the umem
> driver is built on MMU-less systems:
> 
> mm/mmu_notifier.o: In function `do_mmu_notifier_register':
> mmu_notifier.c:(.text+0x32): undefined reference to
> `mm_take_all_locks'
> drivers/infiniband/core/umem.o: In function `ib_umem_get':
> umem.c:(.text+0x132): undefined reference to `can_do_mlock'
> drivers/infiniband/core/umem_odp.o: In function
> `ib_umem_odp_map_dma_pages':
> umem_odp.c:(.text+0x766): undefined reference to
> `get_user_pages_remote'
> 
> This bug has existed for a while but only become apparent in ARM
> randconfig builds when the dependency on PCI was lifted, as none
> of the ARM-NOMMU targets support PCI at the moment.
> 
> We could probably get the umem driver to build by providing an
> alternative implementation 'can_do_mlock()' that returns false
> on NOMMU-systems, but then we'd still have a problem with the
> mmu-notifiers required by CONFIG_INFINIBAND_ON_DEMAND_PAGING,
> so simply forbidding umem with NOMMU seems like the simplest
> workaround.
> 
> Fixes: 931bc0d91639 ("IB: Move PCI dependency from root KConfig to
> HW's KConfigs")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, applied.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-09 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06  7:13 [PATCH] infiniband: add MMU dependency for user_mem Arnd Bergmann
2017-10-09 16:26 ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).