android_kernel_motorola_sm6225/include/rdma
Roland Dreier a394f83bdf IB/umad: Fix bit ordering and 32-on-64 problems on big endian systems
The declaration of struct ib_user_mad_reg_req.method_mask[] exported
to userspace was an array of __u32, but the kernel internally treated
it as a bitmap made up of longs.  This makes a difference for 64-bit
big-endian kernels, where numbering the bits in an array of__u32 gives:

    |31.....0|63....31|95....64|127...96|

while numbering the bits in an array of longs gives:

    |63..............0|127............64|

64-bit userspace can handle this by just treating method_mask[] as an
array of longs, but 32-bit userspace is really stuck: the meaning of
the bits in method_mask[] depends on whether the kernel is 32-bit or
64-bit, and there's no sane way for userspace to know that.

Fix this by updating <rdma/ib_user_mad.h> to make it clear that
method_mask[] is an array of longs, and using a compat_ioctl method to
convert to an array of 64-bit longs to handle the 32-on-64 problem.
This fixes the interface description to match existing behavior (so
working binaries continue to work) in almost all situations, and gives
consistent semantics in the case of 32-bit userspace that can run on
either a 32-bit or 64-bit kernel, so that the same binary can work for
both 32-on-32 and 32-on-64 systems.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 19:59:15 -07:00
..
ib_addr.h IB/sa: Track multicast join/leave requests 2007-02-16 14:20:02 -08:00
ib_cache.h IB: Add caching of ports' LMC 2006-06-17 20:37:34 -07:00
ib_cm.h IB/cm: Include HCA ACK delay in local ACK timeout 2007-07-10 21:50:05 -07:00
ib_fmr_pool.h [PATCH] fmr pool: remove unnecessary pointer dereference 2006-07-14 21:53:51 -07:00
ib_mad.h IB: Include <linux/list.h> from <rdma/ib_mad.h> 2007-08-03 10:45:17 -07:00
ib_marshall.h RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
ib_pack.h [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
ib_sa.h IB/sa: Add new QoS fields to path record 2007-10-09 19:59:12 -07:00
ib_smi.h IB: Move struct port_info from ipath to <rdma/ib_smi.h> 2006-06-17 20:37:36 -07:00
ib_umem.h IB/umem: Add hugetlb flag to struct ib_umem 2007-10-09 19:59:13 -07:00
ib_user_cm.h IB/cm: Fix automatic path migration support 2006-11-29 15:33:10 -08:00
ib_user_mad.h IB/umad: Fix bit ordering and 32-on-64 problems on big endian systems 2007-10-09 19:59:15 -07:00
ib_user_sa.h IB: common handling for marshalling parameters to/from userspace 2006-06-17 20:37:27 -07:00
ib_user_verbs.h IB/uverbs: Return sq_draining value in query_qp response 2006-10-30 21:19:35 -08:00
ib_verbs.h IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c 2007-08-03 10:45:18 -07:00
iw_cm.h RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
rdma_cm.h RDMA/cma: Add ability to specify type of service 2007-10-09 19:59:12 -07:00
rdma_cm_ib.h RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00
rdma_user_cm.h RDMA/ucma: Allow user space to set service type 2007-10-09 19:59:12 -07:00