android_kernel_samsung_msm8976/drivers/infiniband/hw/mthca
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
..
Kconfig
Makefile
mthca_allocator.c IB/mthca: Use IRQ safe locks to protect allocation bitmaps 2006-08-31 17:25:56 -07:00
mthca_av.c [PATCH] slab: remove SLAB_ATOMIC 2006-12-07 08:39:24 -08:00
mthca_catas.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
mthca_cmd.c IB/mthca: Fix reserved MTTs calculation on mem-free HCAs 2007-02-12 16:16:29 -08:00
mthca_cmd.h
mthca_config_reg.h
mthca_cq.c IB: Return "maybe missed event" hint from ib_req_notify_cq() 2007-05-06 21:18:11 -07:00
mthca_dev.h IB: Return "maybe missed event" hint from ib_req_notify_cq() 2007-05-06 21:18:11 -07:00
mthca_doorbell.h
mthca_eq.c IB/mthca: Fix section mismatches 2006-11-29 15:33:06 -08:00
mthca_mad.c IB/mthca: Fix section mismatches 2006-11-29 15:33:06 -08:00
mthca_main.c IB/mthca: Update HCA firmware revisions 2007-04-18 20:21:02 -07:00
mthca_mcg.c IB/mthca: Fix section mismatches 2006-11-29 15:33:06 -08:00
mthca_memfree.c IB/mthca: Fix allocation of ICM chunks in coherent memory 2007-02-16 13:57:33 -08:00
mthca_memfree.h PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
mthca_mr.c IB/mthca: Fix mthca_write_mtt() on HCAs with hidden memory 2007-04-24 16:31:04 -07:00
mthca_pd.c IB/mthca: Fix section mismatches 2006-11-29 15:33:06 -08:00
mthca_profile.c IB/mthca: Merge MR and FMR space on 64-bit systems 2007-02-12 16:16:29 -08:00
mthca_profile.h
mthca_provider.c IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
mthca_provider.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
mthca_qp.c IB/mthca: Work around kernel QP starvation 2007-04-30 17:30:28 -07:00
mthca_reset.c
mthca_srq.c IB/mthca: Work around gcc bug on sparc64 2007-02-10 08:00:49 -08:00
mthca_uar.c IB/mthca: Don't use privileged UAR for kernel access 2006-09-22 15:17:18 -07:00
mthca_user.h
mthca_wqe.h