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

Ralph Campbell ralph.campbell at qlogic.com
Thu Nov 30 12:31:31 PST 2006


On Thu, 2006-11-30 at 12:10 -0800, Roland Dreier wrote:
> So what did you change since v1?  How do you deal with fitting 64-bit
> addresses into an sg list entry that has a 32-bit dma_addr_t?
> 
>  - R.

The ipath_map_sg() handler for ib_dma_map_sg() doesn't store
anything in the struct scatterlist.  The translation is
done when ipath_sg_dma_address() is called which now
returns u64 instead of dma_addr_t thus avoiding the truncation
problem.

All of the callers to ib_dma_map_single(), ib_dma_map_page(),
and ib_sg_dma_address() have been modifed to save the address
in a u64 instead of a dma_addr_t.  This actually wasn't much
of a change since the address was being cast to u64 anway
when assigned to struct sge.addr.





More information about the general mailing list