linux-stable/drivers/infiniband/hw/ipath
Roland Dreier f7c6a7b5d5 IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules
Export ib_umem_get()/ib_umem_release() and put low-level drivers in
control of when to call ib_umem_get() to pin and DMA map userspace,
rather than always calling it in ib_uverbs_reg_mr() before calling the
low-level driver's reg_user_mr method.

Also move these functions to be in the ib_core module instead of
ib_uverbs, so that driver modules using them do not depend on
ib_uverbs.

This has a number of advantages:
 - It is better design from the standpoint of making generic code a
   library that can be used or overridden by device-specific code as
   the details of specific devices dictate.
 - Drivers that do not need to pin userspace memory regions do not
   need to take the performance hit of calling ib_mem_get().  For
   example, although I have not tried to implement it in this patch,
   the ipath driver should be able to avoid pinning memory and just
   use copy_{to,from}_user() to access userspace memory regions.
 - Buffers that need special mapping treatment can be identified by
   the low-level driver.  For example, it may be possible to solve
   some Altix-specific memory ordering issues with mthca CQs in
   userspace by mapping CQ buffers with extra flags.
 - Drivers that need to pin and DMA map userspace memory for things
   other than memory regions can use ib_umem_get() directly, instead
   of hacks using extra parameters to their reg_phys_mr method.  For
   example, the mlx4 driver that is pending being merged needs to pin
   and DMA map QP and CQ buffers, but it does not need to create a
   memory key for these buffers.  So the cleanest solution is for mlx4
   to call ib_umem_get() in the create_qp and create_cq methods.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-08 18:00:37 -07:00
..
ipath_common.h IB/ipath: Force PIOAvail update entry point 2007-04-18 20:20:58 -07:00
ipath_cq.c IB: Return "maybe missed event" hint from ib_req_notify_cq() 2007-05-06 21:18:11 -07:00
ipath_debug.h IB/ipath: Change packet problems vs chip errors handling and reporting 2007-04-18 20:20:55 -07:00
ipath_diag.c IB/ipath: Prevent random program use of diags interface 2007-04-18 20:20:59 -07:00
ipath_dma.c [PATCH] fix ipath_dma_free_coherent() prototype 2007-03-14 15:27:49 -07:00
ipath_driver.c IB/ipath: Disable IB link earlier in shutdown sequence 2007-04-18 20:20:59 -07:00
ipath_eeprom.c IB/ipath: Improve handling and reporting of parity errors 2007-04-18 20:20:58 -07:00
ipath_file_ops.c IB/ipath: Fix unit selection when all CPU affinity bits set 2007-04-18 20:20:59 -07:00
ipath_fs.c inode numbering: change libfs sb creation routines to avoid collisions with their root inodes 2007-05-08 11:15:16 -07:00
ipath_iba6110.c IB/ipath: On unrecoverable errors, force link down, LEDs off 2007-04-18 20:20:59 -07:00
ipath_iba6120.c IB/ipath: On unrecoverable errors, force link down, LEDs off 2007-04-18 20:20:59 -07:00
ipath_init_chip.c IB/ipath: Fix driver crash (in interrupt or during unload) after chip reset 2007-04-18 20:20:58 -07:00
ipath_intr.c IB/ipath: Improve handling and reporting of parity errors 2007-04-18 20:20:58 -07:00
ipath_kernel.h IB/ipath: Improve handling and reporting of parity errors 2007-04-18 20:20:58 -07:00
ipath_keys.c IB/ipath: Check reserved memory keys 2007-04-18 20:21:00 -07:00
ipath_layer.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
ipath_layer.h IB/ipath: remove stale references to userspace SMA 2006-09-22 15:22:32 -07:00
ipath_mad.c IB/ipath: Clean up handling of GUID 0 2006-09-28 11:16:32 -07:00
ipath_mmap.c IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed 2007-04-30 17:30:28 -07:00
ipath_mr.c IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ipath_qp.c IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed 2007-04-30 17:30:28 -07:00
ipath_rc.c IB/ipath: Fix a race condition when generating ACKs 2007-05-06 21:18:11 -07:00
ipath_registers.h IB/ipath: Improve handling and reporting of parity errors 2007-04-18 20:20:58 -07:00
ipath_ruc.c IB/ipath: Support larger IB_QP_MAX_DEST_RD_ATOMIC and IB_QP_MAX_QP_RD_ATOMIC 2007-04-18 20:20:55 -07:00
ipath_srq.c IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed 2007-04-30 17:30:28 -07:00
ipath_stats.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
ipath_sysfs.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
ipath_uc.c IB/ipath: Support larger IB_QP_MAX_DEST_RD_ATOMIC and IB_QP_MAX_QP_RD_ATOMIC 2007-04-18 20:20:55 -07:00
ipath_ud.c IB/ipath: Check that a UD work request's address handle is valid 2007-04-18 20:21:00 -07:00
ipath_user_pages.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
ipath_verbs.c IB: Add CQ comp_vector support 2007-05-06 21:18:11 -07:00
ipath_verbs.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ipath_verbs_mcast.c IB/ipath: account for attached QPs correctly 2006-09-22 15:22:35 -07:00
ipath_wc_ppc64.c IB/ipath: Improved support for PowerPC 2006-09-28 11:16:53 -07:00
ipath_wc_x86_64.c IB/ipath: Call mtrr_del with correct arguments 2006-09-28 11:16:57 -07:00
Kconfig IB/ipath: Depend on CONFIG_NET 2006-11-20 13:06:19 -08:00
Makefile IB/ipath: Implement new verbs DMA mapping functions 2006-12-12 14:28:28 -08:00