arm: dma-mapping: page align size before flush tlb
start and end must be page aligned while calling
flush_tlb_kernel_range else the last page may get
missed while invalidation.
Change-Id: I8fa689ea29ad35f5ae78ddef978f678d7e3355bc
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 18f82ff..af4cfc8 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -974,6 +974,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);