mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
dma-mapping: always use VM_DMA_COHERENT for generic DMA remap
Currently the generic dma remap allocator gets a vm_flags passed by the caller that is a little confusing. We just introduced a generic vmalloc-level flag to identify the dma coherent allocations, so use that everywhere and remove the now pointless argument. Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
fe9041c245
commit
512317401f
5 changed files with 21 additions and 28 deletions
|
|
@ -167,7 +167,7 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
|
|||
if (PageHighMem(page)) {
|
||||
void *p;
|
||||
|
||||
p = dma_common_contiguous_remap(page, size, VM_MAP,
|
||||
p = dma_common_contiguous_remap(page, size,
|
||||
pgprot_noncached(PAGE_KERNEL),
|
||||
__builtin_return_address(0));
|
||||
if (!p) {
|
||||
|
|
@ -192,7 +192,7 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,
|
|||
page = virt_to_page(platform_vaddr_to_cached(vaddr));
|
||||
} else {
|
||||
#ifdef CONFIG_MMU
|
||||
dma_common_free_remap(vaddr, size, VM_MAP);
|
||||
dma_common_free_remap(vaddr, size);
|
||||
#endif
|
||||
page = pfn_to_page(PHYS_PFN(dma_to_phys(dev, dma_handle)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue