virt_to_page/pci_map_page vs. pci_map_single
From: Jamie Wellnitz
Date: Sun Nov 02 2003 - 13:13:05 EST
I see code similar to the following in a few drivers (qlogicfc,
sym53c8xx, acenic does something similar):
page = virt_to_page(buffer);
offset = ((unsigned long)buffer & ~PAGE_MASK);
busaddr = pci_map_page(pci_dev, page, offset, len, direction);
How is this preferable to:
pci_map_single( pci_dev, buffer, len, direction);
?
pci_map_single can't handle highmem pages (because they don't have a
kernel virtual address) but doesn't virt_to_page suffer from the same
limitation? Is there some benefit on architectures that don't have
highmem?
Thanks,
Jamie Wellnitz
Jamie.Wellnitz@xxxxxxxxxx
-
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/