[openib-general] [PATCH 3 of 4] IB/mthca: fix non-cache-coherent CPUs with memfree
Michael S. Tsirkin
mst at mellanox.co.il
Wed Feb 14 02:22:52 PST 2007
> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH 3 of 4] IB/mthca: fix non-cache-coherent CPUs with memfree
>
> > + sg_set_buf(mem, buf, PAGE_SIZE << order);
> > + BUG_ON(mem->offset);
> > + sg_dma_len(mem) = PAGE_SIZE << order;
>
> What am I missing? Any reason to set sg_dma_len() again after sg_set_buf()?
How do you mean, again? Does sg_set_buf set dma_length?
In 2.6.20, I see this in include/linux/scatterlist.h:
static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
unsigned int buflen)
{
sg->page = virt_to_page(buf);
sg->offset = offset_in_page(buf);
sg->length = buflen;
}
--
MST
More information about the general
mailing list