[openib-general] How to support IOMMUs for ipath driver
Or Gerlitz
ogerlitz at voltaire.com
Thu Sep 14 03:51:20 PDT 2006
Ralph Campbell wrote:
> +static inline dma_addr_t ib_dma_map_sg(struct ib_device *dev,
> + struct scatterlist *sg, int nents,
> + enum dma_data_direction direction)
> +{
> + return dev->map_sg ?
> + dev->map_sg(dev, sg, nents, direction) :
> + dma_map_sg(dev->dma_device, sg, nents, direction);
> +}
As SG dma mapping happens in place and you don't want to change struct
scatterlist for every arch, i think you would need to keep some mapping
(hash) from each struct scatterlist to its ipath buddy...
Also you would need to implement the sg_dma_address() and sg_dma_len()
macros used by ULP code when page/s is/are to be input-ed for the IB
verbs layer eg to get an SG FMR-ed or send/recv from/into a page and use
queries into the ipath scatterlist buddy.
Or.
More information about the general
mailing list