[Intel-gfx] [PATCH 1/6] lib/scatterlist: add sg_set_dma_addr() function
Christoph Hellwig
hch at infradead.org
Thu Mar 12 10:19:43 UTC 2020
On Thu, Mar 12, 2020 at 11:14:22AM +0100, Christian König wrote:
> > > The page pointer is set to NULL and only the DMA address,
> > > length and offset values are valid.
> > NAK. The only valid way to fill DMA address in scatterlists is
> > dma_map_sg / dma_map_sg_attr.
>
> How can we then map PCIe BARs into an scatterlist which are not backed by
> struct pages?
You can't. scatterlists by definition map memory backed by a struct
page. If you want to map something else struct scatterlist is the
wrong structure and you need to use something else (which you should
anyway as struct scatterlist is a bad design patter, and the above
is only one of the many issues with it).
More information about the Intel-gfx
mailing list