Messages in this thread | | | Date | Sat, 23 Nov 2013 22:59:01 +0900 | Subject | Re: [PATCH] x86: enable DMA CMA with swiotlb | From | Akinobu Mita <> |
| |
2013/11/23 H. Peter Anvin <hpa@zytor.com>: > On 11/22/2013 04:27 AM, Akinobu Mita wrote: >> >> I'm currently working for integrating DMA CMA with intel-iommu which >> I can test. Regardless of which dma ops is actually used, I would >> like to allocate large contiguous memory with dma_alloc_coherent() >> and tell the base address to the device. >> >> We can use mem= or crashkernel= to reserve host memory, but it is >> complicated and unables to work with real IOMMU. >> > > If you have a real iotlb, why would you need contiguous memory?
Because allocating large memory by dma_alloc_coherent() with intel-iommu fails. intel_alloc_coherent() allocates memory by alloc_pages() and then maps it by __intel_map_single().
What I'm trying change wit inte-iommu is adding the same scheme done by dma_generic_alloc_coherent(), i.e. trying to allocate memory by dma_alloc_from_contiguous() and alloc_pages() is used as a fallback.
| |