Re: virt_to_page/pci_map_page vs. pci_map_single
From: Jes Sorensen
Date: Thu Nov 06 2003 - 03:30:07 EST
>>>>> "James" == James Bottomley <James.Bottomley@xxxxxxxxxxxx> writes:
James> On Tue, 2003-11-04 at 03:48, Jes Sorensen wrote:
>> 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.
James> I really don't see what's to be gained by doing this. map_page
James> is for mapping one page or a fragment of it. It's designed for
James> small zero copy stuff, like networking. To get it to map more
James> than one page, really we should pass in an array of struct
James> pages.
I am totally in favor of that. I think it's a really bad idea on
relying on the pci_map infrstructure to do the page chopping for
multi-page mappings since the IOMMUs will normally have to chop it up
anyway. The driver authors needs to be aware of this.
The above was more meant as an example of how pci_map_page() can be
hacked to do the same thing as pci_map_single if we really wanted to
rely on that behavior.
Cheers,
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/