lkml.org 
[lkml]   [2003]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: virt_to_page/pci_map_page vs. pci_map_single
On Mon, Nov 03, 2003 at 12:48:42PM -0600, James Bottomley wrote:
>
>
> Jamie> The Document/DMA-mapping.txt in 2.6.0-test9 says "To map a
> Jamie> single region, you do:" and then shows pci_map_single. Is
> Jamie> DMA-mapping.txt in need of patching?
>
> Sounds like it needs an update.
>
> Erm, I don't think so. pci_map_single() covers a different use case
> from pci_map_page().
>
> The thing pci_map_single() can do that pci_map_page() can't is cope with
> contiguous regions greater than PAGE_SIZE in length (which you get
> either from kmalloc() or __get_free_pages()). This feature is used in
> the SCSI layer for instance.

Does "pci_map_page(virt_to_page(addr))" handle contiguous regions of
multiple pages? It seems like the i386 implementation will (assuming
we're dealing with kmalloc'd memory). Although the semantics of
map_single seem better to me than map_page, if I'm mapping a single
"region" of multiple pages.

>
> There has been talk of deprecating dma_map_single() in favour of
> dma_map_sg() (i.e. make all transfers use scatter/gather and eliminate
> dma_map_single() in favour of a single sg entry table) but nothing has
> been done about it (at least as far as I know).
>
> James

Thanks,
Jamie Wellnitz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [from the cache]
©2003-2011 Jasper Spaans