iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Scatter-gather DMA
@ 2023-06-06 14:22 Petr Tesařík
  2023-06-07 13:51 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Tesařík @ 2023-06-06 14:22 UTC (permalink / raw)
  To: iommu

Hi all,

while looking through the kernel code, I've noticed multiple places
which try to convert a DMA address to a struct page pointer just
because a struct page is required by the scatterlist library.

Of course, most of them do the wrong thing (e.g. amba-pl011 simply calls
phys_to_page() on the DMA address), but I wonder if this is merely a
limitation of the API. I mean, some DMA addresses are not even backed
by physical RAM, and then there is generally no struct page, but such
addresses may still be perfectly usable for scatter-gather DMA
transfers.

Is there any reason to use struct page except that the SG list API is
based on page lists?

Any comments welcome.

Petr Tesarik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-07 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 14:22 Scatter-gather DMA Petr Tesařík
2023-06-07 13:51 ` Christoph Hellwig
2023-06-07 17:36   ` Petr Tesařík

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).