Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ac75377 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm: dma-mapping: page align size before flush tlb"

parents c2342673 b9082287
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -916,6 +916,7 @@ static void arm_dma_unremap(struct device *dev, void *remapped_addr,
	unsigned int flags = VM_ARM_DMA_CONSISTENT | VM_USERMAP;
	struct vm_struct *area;

	size = PAGE_ALIGN(size);
	remapped_addr = (void *)((unsigned long)remapped_addr & PAGE_MASK);

	area = find_vm_area(remapped_addr);
@@ -926,6 +927,8 @@ static void arm_dma_unremap(struct device *dev, void *remapped_addr,
	}

	vunmap(remapped_addr);
	flush_tlb_kernel_range((unsigned long)remapped_addr,
			(unsigned long)(remapped_addr + size));
}
/*
 * Create userspace mapping for the DMA-coherent memory.