Re: mmap() implementation for pci_alloc_consistent() memory?

From: Clemens Ladisch
Date: Mon May 23 2011 - 04:28:10 EST


Leon Woestenberg wrote:
> Having dma_mmap_coherent() there is good for one or two archs, but how
> can we built portable drivers if the others arch's are still missing?

Easy: Resolve all issues, implement it for all the other arches, and add
it to the official DMA API.

> How would dma_mmap_coherent() look like on x86?

X86 and some others are always coherent; just use vm_insert_page() or
remap_page_range().


Regards,
Clemens
--
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/