android_kernel_motorola_sm6225/drivers/infiniband/hw/ehca
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
..
ehca_av.c [PATCH] slab: remove SLAB_KERNEL 2006-12-07 08:39:24 -08:00
ehca_classes.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ehca_classes_pSeries.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
ehca_cq.c IB: Add CQ comp_vector support 2007-05-06 21:18:11 -07:00
ehca_eq.c IB/ehca: Rework irq handler 2007-02-16 13:57:34 -08:00
ehca_hca.c IB/ehca: Implement modify_port 2007-04-24 21:30:38 -07:00
ehca_irq.c IB/ehca: Make scaling code work without CPU hotplug 2007-03-22 14:40:16 -07:00
ehca_irq.h IB/ehca: Rework irq handler 2007-02-16 13:57:34 -08:00
ehca_iverbs.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ehca_main.c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
ehca_mcast.c IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
ehca_mrmw.c IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ehca_mrmw.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
ehca_pd.c [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
ehca_qes.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
ehca_qp.c [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
ehca_reqs.c IB: Return "maybe missed event" hint from ib_req_notify_cq() 2007-05-06 21:18:11 -07:00
ehca_sqp.c IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
ehca_tools.h IB/ehca: Fix eHCA driver compilation for uniprocessor 2006-10-30 20:52:51 -08:00
ehca_uverbs.c IB/ehca: Remove use of do_mmap() 2007-02-04 14:11:57 -08:00
hcp_if.c IB/ehca: Implement modify_port 2007-04-24 21:30:38 -07:00
hcp_if.h IB/ehca: Implement modify_port 2007-04-24 21:30:38 -07:00
hcp_phyp.c IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
hcp_phyp.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
hipz_fns.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
hipz_fns_core.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
hipz_hw.h IB/ehca: Use named constant for max mtu 2006-11-13 08:46:28 -08:00
ipz_pt_fn.c IB/ehca: Use WQE offset instead of WQE addr for pending work reqs 2006-11-29 15:33:08 -08:00
ipz_pt_fn.h IB: Return "maybe missed event" hint from ib_req_notify_cq() 2007-05-06 21:18:11 -07:00
Kconfig IB/ehca: Allow en/disabling scaling code via module parameter 2007-02-16 13:57:34 -08:00
Makefile IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00