[openib-general] [PATCH 1/7] IB/core - Add DMA mapping functions to allow device drivers to interpose

Roland Dreier rdreier at cisco.com
Thu Nov 2 15:25:22 PST 2006


 > However, this means that the API must give the HCA the choice of
 > what to keep inside the mapping. This could mean, for example, returning
 > a structure that can include dma_addr_t, void*, or both, and a flag to
 > distinguish between the two.

It's an interesting idea.  However I think it may be more trouble than
it's worth, for at least two reasons.  First, the wrapper for
dma_map_sg() will probably become really ugly, although maybe there's
a clever idea.  Second, the consumer right now only gets to pass a
64-bit address into the work request posting functions.  I don't think
we really want to change that interface, so the driver would have to
encode the flag in the address somehow anyway.

Also handling highmem is a problem.  ipath just depends on 64BIT so it
avoids the problem.  I guess mthca could only return a kernel virtual
address if one exists, and always use DMA for highmem pages.  So that
isn't really a serious objection.

 - R.




More information about the general mailing list