[lkml]   [2003]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: virt_to_page/pci_map_page vs. pci_map_single
    On Tue, Nov 04, 2003 at 04:48:10AM -0500, Jes Sorensen wrote:
    > >>>>> "James" == James Bottomley <> writes:
    > James> Erm, I don't think so. pci_map_single() covers a different use
    > James> case from pci_map_page().
    > James> The thing pci_map_single() can do that pci_map_page() can't is
    > James> cope with contiguous regions greater than PAGE_SIZE in length
    > James> (which you get either from kmalloc() or __get_free_pages()).
    > James> This feature is used in the SCSI layer for instance.
    > The question is whether that should be allowed in the first place. Some
    > IOMMU's will have to map it page-by-page anyway. However if it is to
    > remain a valid use then I don't see why pci_map_page() shouldn't be
    > able to handle it under the same conditions by passing it a
    > size > PAGE_SIZE.

    This raises a question for me regarding these rules in 2.4 versus
    2.6. While fixing a bug in PPC's 2.4 pci_map_page/pci_map_sg
    implementations I noticed that a scatterlist created by the IDE
    subsystem will pass nents by page struct reference with a
    size > PAGE_SIZE. Is this a 2.4ism resulting from allowing both
    address and page reference scatterlist entries? This isn't
    explicitly mentioned in the DMA docs AFAICT. I'm wondering
    if this is the same expected behavior in 2.6 as well. If
    pci_map_page() is limited to size <= PAGE_SIZE then I would
    expect pci_map_sg() to be limited as well (and vice versa).

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:58    [W:0.020 / U:4.232 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site